Proxy Authentication in Python

315 views Asked by At

I am building a web scraper that once you enter a URL it grabs the necessary data. I am manually entering my network credentials and my proxy settings. Is there a way around this as this is not a graceful solution? Is there a way to take my default network credentials to authorise the proxy so that I don't get a 407 error?

username = 'username'
password = 'password'
proxies = {'http': 'http://...., 'https': 'https://....}
page = requests.get(URL, proxies=proxies)
0

There are 0 answers