title: Using Python's requests lib throwing ProxyError
body: <p>I am still new to python and can't figure out how to handle this error and what to do with it to avoid it.</p>
  
  <p>When I use <code>requests.get('http://www.baidu.com')</code></p>
  
  <pre><code>    import requests
      header = {'User-Agent':'Mozilla/5.0 (Windows NT 10.0; WOW64)AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36'}
      h=requests.get('http://www.baidu.com',headers=header)
      print h.text
  </code></pre>
  
  <p>It throws a <code>ProxyError</code>:</p>
  
  <pre><code>Traceback (most recent call last):
    File "D:/freedomcoder/Code/Python/rexx/rexx.py", line 8, in &lt;module&gt;
      h = requests.get('http://github.com/kennethreitz/requests/issues/3050',headers=header)
    File "C:\Python27\lib\site-packages\requests\api.py", line 70, in get
      return request('get', url, params=params, **kwargs)
    File "C:\Python27\lib\site-packages\requests\api.py", line 56, in request
      return session.request(method=method, url=url, **kwargs)
    File "C:\Python27\lib\site-packages\requests\sessions.py", line 475, in request
      resp = self.send(prep, **send_kwargs)
  File "C:\Python27\lib\site-packages\requests\sessions.py", line 596, in send
     r = adapter.send(request, **kwargs)
    File "C:\Python27\lib\site-packages\requests\adapters.py", line 485, in send
      raise ProxyError(e, request=request)
  requests.exceptions.ProxyError: HTTPConnectionPool(host='107.160.9.10', port=80): Max retries exceeded with url: http://www.baidu.com/ (Caused by ProxyError('Cannot connect to proxy.', NewConnectionError('&lt;requests.packages.urllib3.connection.HTTPConnection object at 0x02EE4170&gt;: Failed to establish a new connection: [Errno 10061] ',)))
  </code></pre>
  
  <p>But when I use <code>requests.get('https://www.baidu.com')</code>, it returns the correct page. I don't know why this is the case.</p>