I am trying to download a .csv file from a website X using Selenium Firefox, but it keeps saving it in the Download folder instead of the path I set. I would fancy some help here.
The FirefoxProfile has a "DeprecationWarning", therefore I am strictly using the Options() configuration. I tried using "\", "/" and "\\".
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
download_path = "C:\a\very\nice\path"
options = Options()
options.set_preference("browser.download.folderList", '2')
options.set_preference("browser.download.manager.showWhenStarting", False)
options.set_preference("browser.download.dir", download_path)
options.set_preference("browser.helperApps.neverAsk.saveToDisk", "text/csv")
browser = webdriver.Firefox(executable_path=path_gecko,
options=options)