![]() |
disable proxy with requests module - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Web Scraping & Web Development (https://python-forum.io/forum-13.html) +--- Thread: disable proxy with requests module (/thread-2718.html) |
disable proxy with requests module - metulburr - Apr-05-2017 doing a simple request with the requests module causes the error below. This error is due to me using a proxy for web browsers only. However i dont want my requests module to use that proxy. Using selenium, or the standard urllib modules does not do the same. 1) Why does the requests library cause this error?2) Is there a better way to handle it than to do something like.... import requests requests = requests.Session() requests.trust_env = False ... RE: disable proxy with requests module - wavic - Apr-05-2017 You can pass a proxy as a parameter to get() method. I've never used it. See this in SO: http://stackoverflow.com/questions/30837839/how-can-i-set-a-single-proxy-for-a-requests-session-object Or you want to bypass it? RE: disable proxy with requests module - metulburr - Apr-05-2017 that is if you want to add a proxy to your request. Isnt it? I dont want to have a proxy on my request at all, but it is using my browser proxy anyways. |