title: Python error for request.get
body: <p>I am trying to write a Python script which enables me to acces a webpage and download a file from that page. My first attempt was to simply get to that page and i tried the following code:</p>
  
  <pre><code>import requests
  
  url = 'https://www.google.com/?gws_rd=ssl' #using google as an example
  
  r = requests.get(url)
  
  print(r.url)
  </code></pre>
  
  <p>I am given this error: </p>
  
  <pre><code>runfile('C:/Users/ME/Desktop/TMS502.py', wdir='C:/Users/ME/Desktop')
  Traceback (most recent call last):
  
    File "&lt;ipython-input-23-bc585dcceef8&gt;", line 1, in &lt;module&gt;
      runfile('C:/Users/ME/Desktop/TMS502.py', wdir='C:/Users/ME/Desktop')
  
    File "C:\Users\ME\AppData\Local\Continuum\Anaconda\lib\site-packages\spyderlib\widgets\externalshell\sitecustomize.py", line 585, in runfile
      execfile(filename, namespace)
  
    File "C:/Users/ME/Desktop/TMS502.py", line 16, in &lt;module&gt;
      r = requests.get(url)
  
    File "C:\Users\ME\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\api.py", line 55, in get
      return request('get', url, **kwargs)
  
    File "C:\Users\ME\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\api.py", line 44, in request
      return session.request(method=method, url=url, **kwargs)
  
    File "C:\Users\ME\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\sessions.py", line 456, in request
      resp = self.send(prep, **send_kwargs)
  
    File "C:\Users\ME\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\sessions.py", line 559, in send
      r = adapter.send(request, **kwargs)
  
    File "C:\Users\ME\AppData\Local\Continuum\Anaconda\lib\site-packages\requests\adapters.py", line 375, in send
      raise ConnectionError(e, request=request)
  
  ConnectionError: HTTPSConnectionPool(host='www.google.com', port=443): Max retries exceeded with url: /?gws_rd=ssl (Caused by &lt;class 'socket.error'&gt;: [Errno 10054] An existing connection was forcibly closed by the remote host)
  </code></pre>
  
  <p>Can someone please help me?</p>