Using python write a domain whitelist reptiles

Some time ago I wrote an article,SayIt is time to use the whitelist to the wallThe,But that has expired long whitelist,It is not so smooth with the,Then I say boasted:I want to implement your own a reptile,Come crawling China's domain,Good update whitelist。

Ok,All in all this crawler is written on the line and then climb took more than ten thousand,But in the end I found the former to do a better solution,So the project was abandoned reptile[……]

Click link to continue reading...

Python strings and arrays of bytes

When using Python to do network programming will inevitably encounter convert a string to the byte stream,Here we record the following commonly used methods:

First byte array to a string,That is str:

Then the string to a byte array:
[crayon-604538a2d7a9f2794[……]

Click link to continue reading...