urllib2.ProxyHandler

rx do_not_use_this_email at hotmail.com
Tue Apr 18 16:02:34 EDT 2006


I'm trying to hide my IP with the following code:

import urllib2
proxy=[urllib2.ProxyHandler({'http':'24.232.167.22:80'})]
opener=urllib2.build_opener(proxy)
f=opener.open('http://www.whatismyipaddress.com')
print f.read()

But that didn't work - my real IP showed up.

Then I made the following replacement:

proxy=[urllib2.ProxyHandler({'http':'24.232.167.22:80'})]        -> 
proxy=[urllib2.ProxyHandler({'http':'foo'})]

And got the exact same result.

What am I doing wrong ?
Do I need a name instead of 24.232.167.22 ? (but this IP and some others I 
tried didn't have a name)

Thanks in advance....






More information about the Python-list mailing list