diff --git a/pythonwhois/__init__.py b/pythonwhois/__init__.py index 582c3a3..5fcdbf4 100644 --- a/pythonwhois/__init__.py +++ b/pythonwhois/__init__.py @@ -41,7 +41,7 @@ grammar = { 'Record maintained by:\s?(?P.+)', 'Registration Service Provided By:\s?(?P.+)'], 'whois_server': ['Registrar Whois:\s?(?P.+)'], - 'name_servers': ['(?Pd?ns[0-9]+\.([a-z0-9-]+\.)+[a-z0-9]+)', + 'name_servers': ['(?P[a-z]+d?ns[0-9]+\.([a-z0-9-]+\.)+[a-z0-9]+)', '(?P[a-z0-9-]+\.d?ns[0-9]*\.([a-z0-9-]+\.)+[a-z0-9]+)', '(?P([a-z0-9-]+\.)+[a-z0-9]+)(\s+([0-9]{1,3}\.){3}[0-9]{1,3})'], 'emails': ['(?P[\w.-]+@[\w.-]+\.[\w]{2,4})'] diff --git a/test.py b/test.py index 1d96a0a..8a41a47 100644 --- a/test.py +++ b/test.py @@ -9,7 +9,8 @@ testlist = open("testlist.txt").readlines() # if result['updated_date'] is None: # print "WHOIS for %s does not contain an update date?" % line -result = pythonwhois.whois("google.com") +#result = pythonwhois.whois("google.com") +result = pythonwhois.whois(sys.argv[1]) print result #print "Creation date: ",