sslv3警报握手失败(_ssl.c:645)>

时间:2015-12-21 17:54:27

标签: python-3.x urlopen sslv3

这是我的代码:

import urllib.request
try:
    url = 'https://bitinfocharts.com/comparison/hashrate-btc-dash-sma90.html'

# now, with the below headers, we defined ourselves as a simpleton who is
# still using internet explorer.
    headers = {}
    headers['User-Agent'] = "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.27 Safari/537.17"
    req = urllib.request.Request(url, headers = headers)
    resp = urllib.request.urlopen(req)
    respData = resp.read()

except Exception as e:
    print(str(e))
# Results come out as the follows,
<urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)>

我使用Python 3.5并成功安装了 pyOpenSSL 。我自己无法弄明白。

0 个答案:

没有答案