【发布时间】:2015-03-11 09:08:08
【问题描述】:
fh = urllib.urlopen('https://docs.python.org/2/library/urllib.html',proxies=proxies)
其中 proxies 是一个字典,如下所示:
proxies['http'] = "http//user_name:password@ip:port"
proxies['https'] = "https//user_name:password@ip:port"
注意:我在上面的 http 和 https 之后删除了冒号,因为它被视为一个链接,并且我不允许发布超过 2 个链接。
但我收到以下错误:
407 def _real_connect(self, addr, return_errno):
IOError: [Errno socket error] [Errno 1] _ssl.c:510: error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol
我尝试了“Python httplib SSL23_GET_SERVER_HELLO:unknown protocol”上给出的内容,但这给了我以下错误:
407 def _real_connect(self, addr, return_errno):
IOError: [Errno socket error] [Errno 8] _ssl.c:510: EOF occurred in violation of protocol
现在可能是因为大学代理,但我是通过代理提供的。
【问题讨论】: