I have a URL that takes me directly to a pdf. I would like to automatically download that file. Help me with this

I have a URL that takes me directly to a pdf. I would like to automatically download that file. Help me with this.

Hi Mark,

To download file automatically from pdf you can use the command lines mentioned below:

from Selenium import WebDriver

download_dir = "C:\\Temp\\Dowmload"  # for linux/*nix, download_dir="/usr/Public"
options = webdriver.ChromeOptions()

profile = {"plugins.plugins_list": [{"enabled": False, "name": "Chrome PDF Viewer"}], # Disable Chrome's PDF Viewer
               "download.default_directory": download_dir , "download.extensions_to_open": "applications/pdf"}
options.add_experimental_option("prefs", profile)
driver = webdriver.Chrome('//Server/Apps/chrome_driver/chromedriver.exe', chrome_options=options)  # Optional argument, if not specified will search path.

driver.get(`https://www.troweprice.com/content/dam/trowecorp/Pdfs/TRPIL%20MiFID%20II%20Execution%20Quality%20Report%202017.pdf`)