title: python: download a zip file but return error
body: <p>I want to download a zip file from a link. The link points to a zip file which I can download to local storage. Now I want to download it in pythonanywhere, which is a cloud python environment</p>
  
  <p>However, it return error <code>zipfile.BadZipfile: File is not a zip file</code></p>
  
  <pre><code>import requests, zipfile, StringIO
  
  r = requests.get('https://www.url', stream=True)
  z = zipfile.ZipFile(StringIO.StringIO(r.content))
  z.extractall("/home/bybye/shinv")
  </code></pre>
  
  <p>How to download it successfully?</p>