urllib2 getting a webapage authenticating proxy...
Adam
a at a.com
Mon Jun 17 08:13:59 EDT 2002
this code doesnt work for me... i have replaced the proxy details for
security... can anyone help... as i havent been able find any helpfull
websites/examples for urllib2... is urllib2 what i realy want to use for
this...
import urllib2
def get_page(url):
proxy =
urllib2.ProxyHandler({'http':'http://userid:pass@proxy.com:port/'})
opener = urllib2.build_opener(proxy)
site = urllib2.urlopen(url).read()
print(site)
get_page('http://www.python.org/')
More information about the Python-list
mailing list