0

I am getting socket error while connecting to any site from python. However when I use curl to do the same with -k I am able to connect. I am new to python, how do I disable ssl verifier in python ? As to me it seems something related to ssl. It's a https request that I am making here.

 >>> sock.bind(server_address)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Python27\lib\socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
socket.gaierror: [Errno 11001] getaddrinfo failed
Deb
  • 193
  • 1
  • 3
  • 20
  • What does `import socket;socket.getaddrinfo('the url you are trying to get', 443)` do? I tried this locally and got an error unless I removed http:// or https:// – Ciaran Liedeman Sep 12 '15 at 19:04

1 Answers1

0

first you have to import Socket module.Then use the function getaddrinfor().

shashank
  • 1,133
  • 2
  • 10
  • 24
  • I have imported the socket module. Then also I am getting this error. >>> import socket >>> import sys – Deb Sep 13 '15 at 09:34
  • try this: http://stackoverflow.com/questions/22851609/python-errno-11001-getaddrinfo-failed – shashank Sep 19 '15 at 08:06