title: Unable to download a file through requests after getting url from selenium webdriver
body: <p>While working with selenium webdriver, I want to set download location to a particular location and work with the headless browser. But I am unable to do both at once. Upon going headless, download location changes back. 
  Here is the piece of my code:</p>
  
  <pre><code>options = webdriver.ChromeOptions()
  options.add_experimental_option("prefs",{
      "download.default_directory":os.getcwd()+"\mydir",
      "download.prompt_for_download":False,
      "download.directory_upgrade": True
  })
  options.add_argument('--headless')
  driver = webdriver.Chrome(chrome_options=options)
  </code></pre>