Use python requests to download CSV <p>Here is my code: </p> <pre><code>import csv import requests with requests.Session() as s: s.post(url, data=payload) download = s.get('url that directly download a csv report') </code></pre> <p>This gives me the access to the csv file. I tried different method to deal with the download:</p> <p>This will give the the csv file in one string:</p> <pre><code>print download.content </code></pre> <p>This print the first row and return error: _csv.Error: new-line character seen in unquoted field</p> <pre><code>cr = csv.reader(download, dialect=csv.excel_tab) for row in cr: print row </code></pre> <p>This will print a letter in each row and it won't print the whole thing:</p> <pre><code>cr = csv.reader(download.content, dialect=csv.excel_tab) for row in cr: print row </code></pre> <p>My question is what is what's the most efficient way to read a csv file in this situation. And how to download the actual csv file.</p> <p>thanks </p>