Use proxy to load a URL : Proxy « Network « Python






Use proxy to load a URL

 

import urllib
proxies = {'http' : 'http://proxy:80'}
urlopener = urllib.FancyURLopener(proxies)
htmlpage = urlopener.open('http://www.google.com')
data = htmlpage.readlines()
print data

   
  








Related examples in the same category