Python的urllib2的HTTPS和代理NTLM身份验证 [英] Python urllib2 HTTPS and proxy NTLM authentication
本文介绍了Python的urllib2的HTTPS和代理NTLM身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
urllib2的似乎不支持HTTPS与一般的代理身份验证,更不具有NTLM身份验证。任何人都知道,如果有一个补丁用于地方上的HTTPS代理使用NTLM身份验证。
urllib2 doesn't seem to support HTTPS with proxy authentication in general, even less with NTLM authentication. Anyone knows if there is a patch somewhere for HTTPS on proxy with NTLM authentication.
问候,
洛朗
推荐答案
逾期答复。 urllib2的不支持NTLM代理,但 pycurl 一样。摘录:
Late reply. Urllib2 does not support NTLM proxying but pycurl does. Excerpt:
self._connection = pycurl.Curl()
self._connection.setopt(pycurl.PROXY, PROXY_HOST)
self._connection.setopt(pycurl.PROXYPORT, PROXY_PORT)
self._connection.setopt(pycurl.PROXYUSERPWD,
"%s:%s" % (PROXY_USER, PROXY_PASS))
...
这篇关于Python的urllib2的HTTPS和代理NTLM身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文