whois/parser.py
changeset 28 e94a8b50235d
parent 27 2afe979e4f4a
child 30 0ebff1cb6c75
equal deleted inserted replaced
27:2afe979e4f4a 28:e94a8b50235d
    58         'creation_date':    'Creation Date:\s?(.+)',
    58         'creation_date':    'Creation Date:\s?(.+)',
    59         'expiration_date':  'Expir\w+ Date:\s?(.+)',
    59         'expiration_date':  'Expir\w+ Date:\s?(.+)',
    60         'name_servers':     'Name Server:\s?(.+)', # list of name servers
    60         'name_servers':     'Name Server:\s?(.+)', # list of name servers
    61         'status':           'Status:\s?(.+)', # list of statuses
    61         'status':           'Status:\s?(.+)', # list of statuses
    62         'emails':           '[\w.-]+@[\w.-]+\.[\w]{2,4}', # list of email addresses
    62         'emails':           '[\w.-]+@[\w.-]+\.[\w]{2,4}', # list of email addresses
       
    63         'dnssec':           'dnssec:\s*([\S]+)',
    63     }
    64     }
    64 
    65 
    65     def __init__(self, domain, text, regex=None):
    66     def __init__(self, domain, text, regex=None):
    66         self.domain = domain
    67         self.domain = domain
    67         self.text = text
    68         self.text = text
   461         'creation_date':                  'created:\s*([\S]+)',
   462         'creation_date':                  'created:\s*([\S]+)',
   462         'updated_date':                   'modified:\s*([\S]+)',
   463         'updated_date':                   'modified:\s*([\S]+)',
   463         'expiration_date':                'expires:\s*([\S]+)',
   464         'expiration_date':                'expires:\s*([\S]+)',
   464         'name_servers':                   'nserver:\s*([\S]+) \[\S+\]',  # list of name servers
   465         'name_servers':                   'nserver:\s*([\S]+) \[\S+\]',  # list of name servers
   465         'name_server_statuses':           'nserver:\s*([\S]+) \[(\S+)\]',  # list of name servers and statuses
   466         'name_server_statuses':           'nserver:\s*([\S]+) \[(\S+)\]',  # list of name servers and statuses
   466         'dnssec':                   'dnssec:\s*([\S]+)',
   467         'dnssec':                         'dnssec:\s*([\S]+)',
   467 	}
   468 	}
   468     def __init__(self, domain, text):
   469     def __init__(self, domain, text):
   469         if 'Domain not ' in text:
   470         if 'Domain not ' in text:
   470             raise PywhoisError(text)
   471             raise PywhoisError(text)
   471         else:
   472         else: