Python 2.6.6
When I get HTML
Source from Website It gives Error but it works on 3 version
import urllib
link='https://www.bookabach.co.nz/baches-and-holiday-homes/view/38781/'
f=urllib.urlopen(link)
Error as:
Traceback (most recent call last):
File "", line 1, in
f=urllib.urlopen(link)
File "E:\Python26\lib\urllib.py", line 86, in urlopen
return opener.open(url)
File "E:\Python26\lib\urllib.py", line 207, in open
return getattr(self, name)(url)
File "E:\Python26\lib\urllib.py", line 441, in open_https
h.endheaders()
File "E:\Python26\lib\httplib.py", line 908, in endheaders
self._send_output()
File "E:\Python26\lib\httplib.py", line 780, in _send_output
self.send(msg)
File "E:\Python26\lib\httplib.py", line 739, in send
self.connect()
File "E:\Python26\lib\httplib.py", line 1116, in connect
self.sock = ssl.wrap_socket(sock, self.key_file, self.cert_file)
File "E:\Python26\lib\ssl.py", line 338, in wrap_socket
suppress_ragged_eofs=suppress_ragged_eofs)
File "E:\Python26\lib\ssl.py", line 120, in init
self.do_handshake()
File "E:\Python26\lib\ssl.py", line 279, in do_handshake
self._sslobj.do_handshake()
IOError: [Errno socket error] [Errno 1] _ssl.c:490: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version