whois/parser.py
branchio-update
changeset 184 a0cfedec84af
parent 181 71c105a37bc1
equal deleted inserted replaced
183:0ab7f8a39d9b 184:a0cfedec84af
  1048 
  1048 
  1049 class WhoisIo(WhoisEntry):
  1049 class WhoisIo(WhoisEntry):
  1050     """Whois parser for .io domains
  1050     """Whois parser for .io domains
  1051     """
  1051     """
  1052     regex = {
  1052     regex = {
  1053         'status':           'Status\s*: *(.+)',
  1053         'domain_name':                    'Domain Name: *(.+)',
  1054         'name_servers':     'NS \d?\s*: *(.+)',
  1054         'domain__id':                     'Registry Domain ID: *(.+)',
  1055         #'owner':            'Owner\s*: *(.+)',
  1055         'registrar':                      'Registrar: *(.+)',
  1056         'owner':            'Owner OrgName\s*: *(.+)',
  1056         'registrar_id':                   'Registrar IANA ID: *(.+)',
  1057         'expiration_date':  'Expiry\s*: *(.+)',
  1057         'registrar_url':                  'Registrar URL: *(.+)',
  1058         'domain_name':      'Domain\s*: *(.+)',
  1058         'status':                         'Domain Status: *(.+)',
  1059         'registrar':        r'Check for \'[\w\.]*\' --- (.+)',
  1059         'registrant_name':                'Registrant Organization: *(.+)',
       
  1060         'registrant_state_province':      'Registrant State/Province: *(.+)',
       
  1061         'registrant_country':             'Registrant Country: *(.+)',
       
  1062         'name_servers':                   'Name Server: *(.+)',
       
  1063         'creation_date':                  'Creation Date: *(.+)',
       
  1064         'expiration_date':                'Registry Expiry Date: *(.+)',
       
  1065         'updated_date':                   'Updated Date: *(.+)',
  1060     }
  1066     }
  1061 
  1067 
  1062     def __init__(self, domain, text):
  1068     def __init__(self, domain, text):
  1063         if 'is available for purchase' in text:
  1069         if 'is available for purchase' in text:
  1064             raise PywhoisError(text)
  1070             raise PywhoisError(text)
  1479         'tech_email':                     'Tech Email: *(.+)',
  1485         'tech_email':                     'Tech Email: *(.+)',
  1480         'name_servers':                   'Name Server: *(.+)',
  1486         'name_servers':                   'Name Server: *(.+)',
  1481         'creation_date':                  'Creation Date: *(.+)',
  1487         'creation_date':                  'Creation Date: *(.+)',
  1482         'expiration_date':                'Registry Expiry Date: *(.+)',
  1488         'expiration_date':                'Registry Expiry Date: *(.+)',
  1483         'updated_date':                   'Updated Date: *(.+)',
  1489         'updated_date':                   'Updated Date: *(.+)',
  1484         'dnssec':                         'DNSSEC: *([\S]+)'
  1490         'dnssec':                         'DNSSEC: *([\S]+)',
  1485     }
  1491     }
  1486 
  1492 
  1487     def __init__(self, domain, text):
  1493     def __init__(self, domain, text):
  1488         if 'Not found:' in text:
  1494         if 'Not found:' in text:
  1489             raise PywhoisError(text)
  1495             raise PywhoisError(text)