I need a Python 3.5 function that validates a domain. Preferably by looking up the IP/DNS of the hostname.
It has to check the domain is live and is pointed to an IP but does not have to check that the IP is working/valid or returning anything. Also has to be faster than ip = [login to view URL](domain)
It needs to be REALLY fast!
CURRENT CODE
_______________
def ip_from_uri(self):
domain = [login to view URL]()
if domain is None:
return False
try:
ip = [login to view URL](domain)
except [login to view URL]:
return False
except UnicodeError:
return False
return ip
Thanks,
Dave
I did the same thing for my Django project, that server has too many ip addresses and i made it find which ones are the test server. I know exactly what you want. And it's more faster than gethostbyname.
$20 USD w 0 dzień
5,0 (8 opinii)
3,7
3,7
6 freelancerzy składają oferty o średniej wysokości $27 USD dla tej pracy
Hi. I would like to help you. Based on your post do you want to verefied if there is a valid IP associate to that name in better way that you actually do. Hope your answer. Regards