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