"rx" <[EMAIL PROTECTED]> writes:

> 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)

build_opener takes *args, not a list:

import urllib2
handlers = [urllib2.ProxyHandler({'http':'24.232.167.22:80'})]
opener = urllib2.build_opener(*handlers)


or just:

import urllib2
proxy_handler = urllib2.ProxyHandler({'http':'24.232.167.22:80'})
opener = urllib2.build_opener(proxy_handler)


Also, IIRC 2.4 does not allow ports in proxy specification strings
(the values in the dict you pass to ProxyHandler's constructor), and
IIRC 2.5a1 ProxyHandler is broken (it's fixed in the SVN repository).


John

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to