I want to download a daily xml file from a supplier. I managed to login and click the link Accept Download to start the downloading using chromedriver.
But I get the popup "This type of file may harm your computer". The MIME of the page is text/html, I am not sure if link is text/javascript
I tried all suggested solutions with options like
print('Starting..')
prefs = {
'download.default_directory': 'C:\\Users\MainDesk\Downloads',
'download.prompt_for_download': False,
'download.extensions_to_open': 'xml',
'safebrowsing.enabled': False
}
options = Options()
options.add_experimental_option('prefs',prefs)
browser = webdriver.Chrome(options=options, executable_path='C:\\chromedriver.exe')
How can I have my file automatically?
Additionaly I tried go in Settings of Chrome and turn off Ask to save file
I am running the script on Windows 7, with Python 3.7 and Visual Studio and the latest version of chromedriver
It is impossible to automate my download?