Python Version: 3.5.2
OS: OS X 10.12
OpenSSL Version: OpenSSL 1.1.0b 26 Sep 2016
I'm trying to requests "https://alpha.wallhaven.cc".
import urllib.request
init_page=urllib.request.urlopen("https://alpha.wallhaven.cc")
Then get
ssl.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)
and
During handling of the above exception, another exception occurred:
...
urllib.error.URLError: <urlopen error [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:645)>
The following solutions don't work:
import requests.packages.urllib3.util.ssl_
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS='ALL'
import ssl
ssl._create_default_https_context = ssl._create_unverified_context
import requests
print(requests.get("https://alpha.wallhaven.cc",verify=False))
or change /APNSWrapper/connection.py line 131:
ssl_version = self.ssl_module.PROTOCOL_SSLv3,
into
ssl_version = self.ssl_module.PROTOCOL_TLSv1,
Then what is the problem? How to solve it?
Thanks a lot!
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…