I wanna use urllib2 to get a page with a socks 5 proxy, who can give me a sample code ?
Fuzzyman
fuzzyman at gmail.com
Sun Apr 9 12:31:31 EDT 2006
Ju Hui wrote:
> I wanna use urllib2 to get a page with a socks 5 proxy,who can give me
> a sample code ?
>
> example,
> the proxy server is :123.123.123.123
> and the port is :1080
> and the username/password is : user/pass
> I want to open http://www.google.com
>
> how to write this kind of script?
I'm pretty sure that urllib2 doesn't work with SOCKS proxies of any
kind.
I think you'll have to use pycurl (extension library - not in standard
lib). This is mcuh more powerful, but not so simple to use.
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
> thanks.
More information about the Python-list
mailing list