Skip to content Skip to sidebar Skip to footer

How To Use Requests Library Without System-configured Proxies

If I supply None or an empty dict to the proxies parameter, requests will automatically fall back to the proxies configured for the operating system as obtained through urllib.requ

Solution 1:

Turns out you have to use an empty string for the protocol you want to use a direct connection:

r = requests.get('http://google.com', proxies = { 'http': '', ... })

Weird, but that's life.

Post a Comment for "How To Use Requests Library Without System-configured Proxies"