I have a situation where the download link for a website is generalized across all individual profiles: https://www.ffiec.gov/npw/Institution/HistoryExportToCSV
Which appears to be implemented by visiting after visiting the profile URL: https://www.ffiec.gov/npw/Institution/Profile/242?dt=20120101
I'm trying to handle this using the requests library, but is there a way to sequentially visit the first URL after visiting the second?
I thought the following might do it but I'm not getting anything in return:
import requests
headers = {"Referer": "https://www.ffiec.gov/npw/Institution/Profile/242?dt=20120101"}
url = "https://www.ffiec.gov/npw/Institution/HistoryExportToCSV"
req = requests.get(url, headers=headers)
csv = req.content