I have multiple reports that I need to run and export from service now. I have been using a URL with filtering to get the reports downloaded directly into the downloads folder this way,but would like to create a python 3.10.5 script that would do all this for me and save it all to a specified location. I would then add to this code to do some data merging and add extra columns to the CSV. Is this even possible given ServiceNow requires credentials?
from urllib.request import urlopen
# Download from URL.
with urlopen( 'MyURL' ) as download:
content = webpage.read()
# Save to file.
with open( 'output.html', 'wb' ) as download:
download.write( content )
getting a heap of errors most notably HTTP Error 401: unauthorized