Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)EI
evil_uncle_iroh @lemmy.world
Posts 1
Comments 1

Trying to download a file

I'm trying to automate a process where I log into a website, download a series of documents, process them, then re-upload. I'm having trouble downloading; the preferences don't seem to work: chromedriver_path = "C:\\Users\\XXX\\PycharmProjects\\YYY\\util_files\\chromedriver-win64\\chromedriver.exe" service = Service(chromedriver_path) options = Options() options.headless = True options.add_argument("--incognito") prefs = {"download.default_directory": "C:\\Users\\XXX\\Downloads", "download.prompt_for_download": False, "download.directory_upgrade": True} options.add_experimental_option("prefs", prefs) driver = webdriver.Chrome(service=service, options=options) It doesn't run it headless (not a big deal) but it keeps prompting me with the download dialog. It's tough to find a solution online because it seems like Selenium has updated how it does some things over time, so I don't know of my code is the most up to date or not. TIA

1