def __init__(self, *args, **kwargs):
try:
kwargs['context'] = ssl._create_unverified_context()
except AttributeError:
# Python prior to 2.7.9 doesn't have default-enabled certificate
# verification
pass
urllib2.HTTPSHandler.__init__(self, *args, **kwargs)
评论列表
文章目录