title: Unzip csv from url that doesn’t contain filename results in “File is not a zip file.”
body: <p>I want to download a bunch of zipped CSVs. Ideally I want to extract each zipped csv and process it with pandas without having to save the files to disk. 
  The issue I am having is that the URLs I need to get the zip files from don't contain filename.zip in them but look as follows: </p>
  
  <p><a href="https://api.awrcloud.com/v2/get.php?action=get_visibility&amp;token=mytoken&amp;project=client5Bw%5D&amp;fileName=visibility_api-client-file+%5Bw%5D_2019-09-25-2019-10-23" rel="nofollow noreferrer">https://api.awrcloud.com/v2/get.php?action=get_visibility&amp;token=mytoken&amp;project=client5Bw%5D&amp;fileName=visibility_api-client-file+%5Bw%5D_2019-09-25-2019-10-23</a></p>
  
  <p>What is weird is that sometimes when processing all my urls  I am able to process the file with the function below and unzip the csv. But most of the time I get the error: <em>File is not a zip file</em>. </p>
  
  <p>The thing is that if I copy paste the URL into my browser I am able to download the file.  I read and implemented many of the related topics here on stackoverflow related to unzipping in memory but none of them have helped so far.</p>
  
  <pre><code>from dotenv import dotenv_values
  import requests
  import pandas as pd
  import zipfile
  from io import BytesIO
  
  def processRankingdata(url):
  
      response = requests.get(url)
      # {"response_code":25,"message":"Export in progress. Please come back later"}
      if "response_code" not in response:
          try:
              with zipfile.ZipFile(io.BytesIO(response.content)) as thezip:
                  for zipinfo in thezip.infolist():
                      with thezip.open(zipinfo) as thefile:
                         # yield zipinfo.filename, thefile
                          df = pd.read_csv(thefile)
          except Exception as e:
              print ('No Zip file for ' + url)
              #print (e)
              with open('awr_no_zip_failed_urls.txt', 'a+') as filehandle:
                  filehandle.write(url + '\n')
          else:
  </code></pre>
  
  <p>The response headers when accessing the URL from the browser are as follow: </p>
  
  <pre><code>
  cache-control: private, no-cache, no-store, proxy-revalidate, no-transform
  content-description: File Transfer
  content-disposition: attachment; filename=client-name-ranking-export-2019-09-25-2019-10-23_csv.zip
  content-length: 148893
  content-type: application/download
  date: Wed, 23 Oct 2019 14:07:18 GMT
  pragma: no-cache
  server: Apache/2.4.37 (Amazon) PHP/7.0.32
  status: 200
  vary: User-Agent
  x-powered-by: PHP/7.0.32
  
  </code></pre>
  
  <p>Thanks for your patience and support.</p>