diff --git a/pythonwhois/__init__.py b/pythonwhois/__init__.py index 8ae34e6..f4380f2 100644 --- a/pythonwhois/__init__.py +++ b/pythonwhois/__init__.py @@ -19,18 +19,21 @@ grammar = { 'Created on\s?[.]*:\s?(?P.+)\.', 'Date Registered\s?[.]*:\s?(?P.+)', 'Domain Created\s?[.]*:\s?(?P.+)', - 'Domain registered\s?[.]*:\s?(?P.+)'], + 'Domain registered\s?[.]*:\s?(?P.+)', + 'Domain record activated\s?[.]*:\s*?(?P.+)'], 'expiration_date': ['Expires on:\s?(?P.+)', 'Expires on\s?[.]*:\s?(?P.+)\.', 'Expiry Date\s?[.]*:\s?(?P.+)', 'Domain Currently Expires\s?[.]*:\s?(?P.+)', - 'Record will expire on\s?[.]*:\s?(?P.+)'], + 'Record will expire on\s?[.]*:\s?(?P.+)', + 'Domain expires\s?[.]*:\s*?(?P.+)'], 'registrar': ['Registered through:\s?(?P.+)', 'Registrar Name:\s?(?P.+)', 'Record maintained by:\s?(?P.+)'], 'whois_server': ['Registrar Whois:\s?(?P.+)'], 'name_servers': ['(?Pd?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-]+\.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})'] }, "_dateformats": ( @@ -164,16 +167,22 @@ def parse_dates(dates): hour = int(result.group("hour")) except IndexError, e: hour = 0 + except TypeError, e: + hour = 0 try: minute = int(result.group("minute")) except IndexError, e: minute = 0 + except TypeError, e: + minute = 0 try: second = int(result.group("second")) except IndexError, e: second = 0 + except TypeError, e: + second = 0 break except ValueError, e: