I'm downloading a pdf through the automatic navigation through the site, so I deactivated the pdf preview of chrome and activated to download the pdf automatically, how would I change the name of this pdf file by code? There are 64 files, I thought of playing a variable with nothing, and giving a specific name for each of the 64, would it have?
First section of Còdigo is to disable the pdf viewer and to download automatically and the second is the button that I click to download
chrome_options = Options()
download_dir = "C:\scrapy"
chrome_options.add_experimental_option('prefs', {
"plugins.plugins_list": [{"enabled":False,"name":"Chrome PDF Viewer"}],
"download": {
"prompt_for_download": False,
"default_directory" : download_dir
}
})
conta_completa = driver.find_element_by_id('btnVerContaCompleta')
conta_completa.click()
sleep(20)