0

I use socket.gethostbyaddr to get the ip of a domain, and it does not give me any results , while ping and dig can return the IP correctly.

 >>> import socket
    >>> socket.gethostbyaddr('supplychristianlouboutin.com')
    Traceback (most recent call last):
      File "<input>", line 1, in <module>
    herror: [Errno 1] Unknown host

So it's weird to me why this API is not reliable?Any suggestions?

Alex
  • 1,914
  • 6
  • 26
  • 47

0 Answers0