解决python2.x用urllib2证书验证错误, _create_unverified_context

解决python2.x用urllib2证书验证错误, _create_unverified_context 解决以下错误: 错误1:Attribut
解决python2.x用urllib2证书验证错误, _create_unverified_context

解决以下错误:

错误1:AttributeError: 'module' object has no attribute '_create_unverified_context',

错误2:URLError:

 

在代码中加入以下代码:

复制代码
 1 import ssl2 3 try:4     _create_unverified_https_co