我正在尝试使用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)


附言-我正在使用Python 2.7.11

最佳答案

我将OpenSSL更新为最新版本,现在可以正常使用了:)

关于python - Python中的SSL握手错误(_ssl.c:590),我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44644849/

10-14 00:56