I am trying to reassign the Chrome download default directory when scraping a .csv
file with Selenium. I've tried using Chromedriver 77, 76, and 75, but continue to get the same error... not sure what I'm doing wrong here.
### Set Chrome Options ###
opts = webdriver.ChromeOptions()
prefs = {
"download.default_directory": "C:/Users/WTC/Desktop",
"download.prompt_for_download": False,
"download.directory_upgrade": True
}
opts.add_experimental_option("prefs",prefs)
opts.add_argument("test-type")
opts.add_argument("--disable-web-security")
opts.add_argument("--allow-running-insecure-content")
chromedriver = "C:/Users/WTC/AppData/Local/Programs/Python/Python37-32/Scripts/chromedriver.exe"
driver = webdriver.Chrome(executable_path=chromedriver, options=opts)