I am trying to get the domain IP address. I am using the following code
>> import socket >> socket.gethostbyname('www.google.com')
which gives me the following error.
Traceback (most recent call last): File "<pyshell#18>", line 1, in <module> socket.gethostbyname('www.google.com') gaierror: [Errno 11001] getaddrinfo failed
what's wrong with my code ... is there any other way to get the ip address by domain name in python .. ??? please, help...
source share