Python urllib2 库是否使用 Windows 上的 IE 代理设置默认值? [英] Does Python urllib2 library use the IE proxy setting default on Windows?
本文介绍了Python urllib2 库是否使用 Windows 上的 IE 代理设置默认值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我注意到 urllib2 库使用了我的 IE 代理设置.对此有官方解释吗?
I noticed the urllib2 library used my IE proxy setting. Any official explanation for this?
非常感谢.
推荐答案
参见 urllib2
关于 ProxyHandler
的部分.
See the urllib2
section on ProxyHandler
.
默认是从环境变量
中读取代理列表.如果没有设置代理环境变量,在 Windows 环境中,代理设置从注册表的 Internet 设置部分获取,而在 Mac OS X 环境中,代理信息从 OS X 系统配置框架中检索.
The default is to read the list of proxies from the environment variables
<protocol>_proxy
. If no proxy environment variables are set, in a Windows environment, proxy settings are obtained from the registry’s Internet Settings section and in a Mac OS X environment, proxy information is retrieved from the OS X System Configuration Framework.
这篇关于Python urllib2 库是否使用 Windows 上的 IE 代理设置默认值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文