multithreading - Python proxy checker, change to threaded version -
I have checked some dragon proxy.
And to accelerate the investigation, I decided the change version for multi-sequence,
and thread module is the first for me, I was tried several times the version < / P>
Thread and many information is to convert to look, but it is not so easy for newbie python programmers.
If someone can really appreciate me very much !!
Thanks in advance!
urllib2.install_opener ()
installs the function global opener, i.e. this thread is not secure I am its Do not call the opener.open ()
method instead of global urllib2.urlopen ()
function abuse. Also use the class from the queue
queue
module to hold the list of proxies to check. It's OK to use the rest of your code in threaded mode.
Comments
Post a Comment