title: Log in into website and download file with python requests
body: <p>I have a website with a HTML-Form. After logging in it takes me to a start.php site and then redirects me to an overview.php.</p>
  
  <p>I want to download files from that server... When I click on the download link of a ZIP-File the address behind the link is:</p>
  
  <pre><code>getimage.php?path="vol/img"&amp;id="4312432"
  </code></pre>
  
  <p>How can I do that with requests? I tried to create a session and do the GET-Command with the right params... but the answer is just the website I would see when I'm not logged in.</p>
  
  <pre><code>c = requests.Session()
  c.auth =('myusername', 'myPass')
  request1 = c.get(myUrlToStart.PHP)
  tex = request1.text
  
  with open('data.zip', 'wb') as handle:
      request2 = c.get(urlToGetImage.Php, params=payload2, stream=True)
      print(request2.headers)
      for block in request2.iter_content(1024):
          if not block:
              break
  
          handle.write(block)
  </code></pre>