title: How to download pdf files using selenium in python
body: <p>I am trying to download pdf files from website using selenium but i am able to open file but its not auto downloadable using code. </p>
  
  <p>Code:</p>
  
  <pre><code>chrome_profile = webdriver.ChromeOptions()
  profile = {"download.default_directory": "C:\Users\Downloads",
     "download.prompt_for_download": False,
     "download.directory_upgrade": True,
     "plugins.plugins_disabled": ["Chrome PDF Viewer"]}
  chrome_profile.add_experimental_option("prefs", profile)
  </code></pre>
  
  <p>Please suggest. Thank you in advance</p>