DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Richard has posted 22 posts at DZone. View Full User Profile

Urlib2 Proxy Connection With Python And A Screen Scrape Flourish

02.09.2006
| 605 views |
  • submit to reddit
        // description of your code here

import urllib2
req = urllib2.Request(url = 'http://lion.chadwyck.co.uk')
req.set_proxy('march.private.chadwyck.co.uk:3128', 'http')
r = urllib2.urlopen(req)
data = r.read()