Recently, the boy’s girlfriend is unusual, often late home, said something, other what also refused to say;

So he came up to me and asked if I could locate his girlfriend while she was out;

This must be arranged on ah, here is the specific operation:


Step 1: IP address

IP address: IP address is divided into local area network (LAN) and wide area network (WAN). It implements Internet networks with different hardware structures and operating systems globally. In the entire Internet, no node is distinguished and connected with each other by unique IP address.

Step 2: Write the script

Enter a professional IP address big data statistics platform, analyze the website structure, find the content we need;

After analysis, the structure of the site is very simple, there is no special protection, the following is the content we need to grab; But here I’m using a graphical interface to do it.

Our purpose is to obtain THE IP location of its address, so to give the guy’s girlfriend an input IP conditions, through the crawler to grab the site data after the area

When it runs, it has a very simple interface; Some of the attributes in the application are also very simple, but there is no more description

In this way, a simple script by IP location is written

Step 3: Obtain IP data

First, generate headers with one key

Step 4: Use re regular expressions; Parsing data content

Regular expressions are a very flexible way of parsing, using a simple and crude wildcard scheme

Step 5: Display the parsed content on the interface

This uses postback, which posts parsed content back to the window list for display.

In the graphical interface, Button component has a attribute called Command, which can bind an event. When we click this component, the bound event will be executed, and this event is our crawler.

Obtain the detailed IP address:

Location to be queried by IP address:

All right, you pick a place to mourn this guy in silence!