Over a million developers have joined DZone.

Urlib2 Proxy Connection With Python And A Screen Scrape Flourish

·
// 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()
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}