I want to give a specific path to save file downloaded from http url
the code below dumps the file to my Downloads directory.
import webbrowser
url = 'https://some_api_path¶ms=SOME_PARAMS&download=true'
webbrowser.open(url)
I need to control destiny path/filename of downloaded file (via chrome browser) in order to filter downloaded files based on params passed to api.
You can use module Requests
import requests
url = 'https://www.python.org/static/img/python-logo@2x.png'
myfile = requests.get(url)
open('./pythonlogo.png', 'wb').write(myfile.content)
Saved File "pythonlogo.png" to the current folder!