How to ignore windows proxy settings with python urllib?
问题 I want Python to ignore Windows proxy settings when using urllib . The only way I managed to do that was disabling all proxy settings on Internet Explorer. Is there any programmatic way? os.environ['no_proxy'] is not a good option, since I'd like to avoid proxy for all addresses. 回答1: Pass to urlopen method proxies={} or try with: urllib.getproxies = lambda x = None: {} just after urllib import (Info found here). 回答2: From the urlib2 documentation: Class urllib2.ProxyHandler([proxies]) ... To