I am working on a scraping project where sometimes visiting an URL downloads file automatically. For that I have specified the fixed download path like below -
options = webdriver.ChromeOptions()
prefs = {"download.default_directory": "/home/user/Documents/project/downloads"}
options.add_experimental_option("prefs", prefs)
options.add_argument("--headless")
return webdriver.Chrome(options=options)
This used to work like a week ago, but today the file always gets downloaded to current directory instead of the specified path. What could be causing this to happen? Am I missing something :(
You can try this URL as an example.
Thanks