0

I was not able to fetch url from biblegateway.com here it shows error as urllib2.URLError: <urlopen error [Errno 1] _ssl.c:510: error:14077410:SSL routines:SSL23_GET_SERVER_HELLO:sslv3 alert handshake failure> Please don't make duplicate as i went throught the sites which shown in duplicate i didn't understand by visiting that site .

here is my code

import urllib2
url = 'https://www.biblegateway.com/passage/?search=Deuteronomy+1&version=NIV'
response = urllib2.urlopen(url)
html = response.read()
print html
Evgeny
  • 4,173
  • 2
  • 19
  • 39
Biki Teron
  • 237
  • 2
  • 4
  • 12
  • Which python? Compare to https://stackoverflow.com/questions/30918761/sslv3-alert-handshake-failure-with-urllib2 and https://stackoverflow.com/questions/31649390/python-requests-ssl-handshake-failure – dave_thompson_085 Jun 30 '19 at 18:34
  • I am using python 2.7 @dave_thompson_085 – Biki Teron Jun 30 '19 at 18:35
  • Possible duplicate of [python requests ssl handshake failure](https://stackoverflow.com/questions/31649390/python-requests-ssl-handshake-failure) – Abdeslem SMAHI Jun 30 '19 at 18:39

1 Answers1

1

Here is a good reference for fetching url.

In python 3 you can have:

from urllib.request import urlopen
URL = 'https://www.biblegateway.com/passage/?search=Deuteronomy+1&version=NIV'
f = urlopen(URL)
myfile = f.read()
print(myfile)

Not sure it clears a ssl problem though. Maybe some clues here.

Evgeny
  • 4,173
  • 2
  • 19
  • 39