I need to download a file using a python script when i am in the office ... Long term goal is to give this out to my team mates but need to fix the proxy issue
Here is the code I am using right now
import urllib.request
import shutil
url = "https://download/app/client/app.exe"
output_file = "C:\\Desktop\\testing\\App.exe"
with urllib.request.urlopen(url) as response, open(output_file, 'wb') as out_file:
shutil.copyfileobj(response, out_file)
When i launch this script it just hangs and I know it is because of the proxy issue .... How can i set this to use my corporate proxy? Ideally it would be great to get this to use proxy settings based on location (home vs office) but i will take what i can get