I want to find a correct way of verify that website is https enable by providing its url
import httplib
conn = httplib.HTTPSConnection("www.python.org")
conn.request("GET", "/")
r1 = conn.getresponse()
print r1.status, r1.reason
data1 = r1.read()
conn.request("GET", "/")
r2 = conn.getresponse()
print r2.status, r2.reason
data2 = r2.read()
conn.close()
but i'm getting following error
Traceback (most recent call last): File "C:/Users/muhammad.faisal/Documents/NLP/Main.py", line 54, in conn.request("GET", "/") File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\httplib.py", line 1042, in request self._send_request(method, url, body, headers) File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\httplib.py", line 1082, in _send_request self.endheaders(body) File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\httplib.py", line 1038, in endheaders self._send_output(message_body) File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\httplib.py", line 882, in _send_output self.send(msg) File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\httplib.py", line 844, in send self.connect() File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\httplib.py", line 1255, in connect HTTPConnection.connect(self) File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\httplib.py", line 821, in connect self.timeout, self.source_address) File "C:\Users\muhammad.faisal\AppData\Local\Continuum\Anaconda2\lib\socket.py", line 557, in create_connection for res in getaddrinfo(host, port, 0, SOCK_STREAM): socket.gaierror: [Errno 11002] getaddrinfo failed