我正在尝试使用python请求获得响应。但是我面临SSL握手错误。我尝试了很多解决方案,但似乎没有任何效果。请帮忙。提前致谢
这是代码:
import requests
url = "https://androidappsapk.co/download/com.facebook.katana"
requests.get(url, verify = False)
这是我得到的错误:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 55, in get
return request('get', url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/api.py", line 44, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python2.7/site-packages/requests/adapters.py", line 382, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)
P.S。 - 我使用的是Python 2.7.11
答案 0 :(得分:1)
我将OpenSSL更新到最新版本,它现在正常工作:)