I looked into the documentation of urllib but all I could find on proxies was related to urlopen. However, I want to download a PDF from a given URL and store it locally but using a certain proxy server. My approach so far which did not work:
import urllib2
proxies = {'http': 'http://123.96.220.2:81'}
opener = urllib2.FancyURLopener(proxies)
download = opener.urlretrieve(URL, file_name)
The error is AttributeError: FancyURLopener instance has no attribute 'urlretrieve'