URLError: <urlopen error [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 警报协议版本 (_ssl.c:661)>



我在标题中获取错误

我有Python 2.7.14和OpenSSL 1.0.2k 2017年1月26日

ctx = ssl.SSLContext(ssl.PROTOCOL_TLS) #Itried all the other protocols
ctx.check_hostname = False #fails with or without these 2 lines
ctx.verify_mode = ssl.CERT_NONE
resp = urllib2.urlopen(url, context=ctx).read()

更新:这是URL(敏感数据替换为..(https://www.upwork.com/api/hr/v2/teams/../users.json?oauth_consumer_key=...&amp; amauth_nonce=...= ..&amp; oauth_version = 1.0&amp; tz = gmt&amp; oauth_signature = ..

所有键和令牌都可以使用,因为我也在Javscript平台上使用它们,并且它们在那里正常工作。还可以简单地粘贴浏览器中的链接。但是在Python中,我不知道该如何调试。有人可以帮忙吗?谢谢你,非常感谢

ctx = ssl.sslcontext(ssl.protocol_tls(#iT所有其他协议

没有ssl.PROTOCOL_TLS。例如,ssl.PROTOCOL_TLSv1不起作用,并且有ssl.PROTOCOL_TLSv1_2对我有用。甚至更好地使用ssl.create_default_context()

最新更新