diff -r 08cfbab35d0b -r 71c105a37bc1 whois/parser.py --- a/whois/parser.py Tue May 22 15:10:43 2018 +0000 +++ b/whois/parser.py Tue May 29 14:46:00 2018 +0700 @@ -281,6 +281,8 @@ return WhoisLu(domain, text) elif domain.endswith('.cz'): return WhoisCz(domain, text) + elif domain.endswith('.online'): + return WhoisOnline(domain, text) else: return WhoisEntry(domain, text) @@ -1459,3 +1461,31 @@ else: WhoisEntry.__init__(self, domain, text, self.regex) + +class WhoisOnline(WhoisEntry): + """Whois parser for .online domains + """ + regex = { + 'domain_name': 'Domain Name: *(.+)', + 'domain__id': 'Domain ID: *(.+)', + 'whois_server': 'Registrar WHOIS Server: *(.+)', + 'registrar': 'Registrar: *(.+)', + 'registrar_id': 'Registrar IANA ID: *(.+)', + 'registrar_url': 'Registrar URL: *(.+)', + 'status': 'Domain Status: *(.+)', + 'registrant_email': 'Registrant Email: *(.+)', + 'admin_email': 'Admin Email: *(.+)', + 'billing_email': 'Billing Email: *(.+)', + 'tech_email': 'Tech Email: *(.+)', + 'name_servers': 'Name Server: *(.+)', + 'creation_date': 'Creation Date: *(.+)', + 'expiration_date': 'Registry Expiry Date: *(.+)', + 'updated_date': 'Updated Date: *(.+)', + 'dnssec': 'DNSSEC: *([\S]+)' + } + + def __init__(self, domain, text): + if 'Not found:' in text: + raise PywhoisError(text) + else: + WhoisEntry.__init__(self, domain, text, self.regex)