title: Python urllib2 problems
body: <p>I have a  very basic script to download a website using Python urllib2.</p>
  
  <p>This has been working brilliantly for the past 6 months, and then this morning it no longer works?</p>
  
  <pre><code>#!/usr/bin/python
  import urllib2
  proxy_support = urllib2.ProxyHandler({'http': 'http://DOMAIN\USER:PASS@PROXY:PORT/'})
  opener = urllib2.build_opener(proxy_support)
  urllib2.install_opener(opener)
  translink = open('/tmp/trains.html' ,'w')
  response = urllib2.urlopen('http://translink.com.au')
  html = response.read()
  translink.write(html)
  translink.close()
  </code></pre>
  
  <p>I am now getting the following error </p>
  
  <pre><code>Traceback (most recent call last):
    File "./gettrains.py", line 7, in &lt;module&gt;
      response = urllib2.urlopen('http://translink.com.au')
    File "/usr/lib/python2.7/urllib2.py", line 127, in urlopen
      return _opener.open(url, data, timeout)
    File "/usr/lib/python2.7/urllib2.py", line 407, in open
      response = meth(req, response)
    File "/usr/lib/python2.7/urllib2.py", line 520, in http_response
      'http', request, response, code, msg, hdrs)
    File "/usr/lib/python2.7/urllib2.py", line 445, in error
      return self._call_chain(*args)
    File "/usr/lib/python2.7/urllib2.py", line 379, in _call_chain
      result = func(*args)
    File "/usr/lib/python2.7/urllib2.py", line 528, in http_error_default
      raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
  urllib2.HTTPError: HTTP Error 502: Proxy Error ( The HTTP message includes an unsupported header or an unsupported combination of headers.  )
  </code></pre>
  
  <p>I am new to Python, any help would be very much appreciated.</p>
  
  <p>Cheers</p>
  
  <pre><code>#!/usr/bin/python
  import requests
  proxies = {
  "http": "http://domain\user:pass@proxy:port",
  "https": "http:// domain\user:pass@proxy:port",
  } 
  html = requests.get("http://translink.com.au", proxies=proxies)
  translink = open('/tmp/trains.html' ,'w')
  translink.write(html.content)
  translink.close()
  </code></pre>