I am new in python and currently working on a project and I have been stuck in exporting a table from the servicenow website using the code below, but is returning a URL redirection instead of the CSV.
url = "https://url.service-now.com/nav_to.do?" \
"uri=server_list.do?sysparm_query=active=false%26CSV"
response = requests.get(url, stream=True, headers=headers, allow_redirects=True, verify="C:\\Users\\user\\PycharmProjects\\cert.crt")
LocalFilePath = "C:\\Users\\user\\Documents\\Projects\\Reporting\\server.csv"
with open(LocalFilePath, 'wb') as csv2:
csv2.write(response.content)Any help and suggestion is much appreciated.
