Reputation: 3938
I am trying to use urllib, urllib2 or requests in order to get specific data from a site. I use Python2.7. I keep getting an error:
requests.exceptions.SSLError: [SSL: SSLV3_ALERT_HANDSHAKE_FAILURE] sslv3 alert handshake failure (_ssl.c:590)
This is my code with requests:
import requests
r = requests.get("https://metoc.ndbc.noaa.gov/jtwc#_48_INSTANCE_0SiamlX2KcM6_=https%3A%2F%2Fmetoc.ndbc.noaa.gov%2FProductFeeds-portlet%2Fimg%2Fjtwc%2Fhtml%2Fcoop.jsp%3F")
I have tried everything but nothing works:
I tried to set the verification parameter to false. I get the same error. I tried to use an adaptor (as described in other answers) in order to use another SSL version. I still get the same error.
Any ideas what can the issue be? Can it be that the host has locked the access and there is no possibility to get the source for this URL?
Upvotes: 0
Views: 316
Reputation: 123531
All of them in macs with Yosemite or ElCapitan...
These versions still come with OpenSSL 0.9.8 so my guess is that your python is linked against this version of OpenSSL (python does not use the native TLS stack in OS X). But since the server only supports ECDHE ciphers and these are not supported by OpenSSL 0.9.8 the handshake will fail. See the report from SSLLabs for more details.
Upvotes: 2