279 return WhoisSpace(domain, text) |
279 return WhoisSpace(domain, text) |
280 elif domain.endswith('.lu'): |
280 elif domain.endswith('.lu'): |
281 return WhoisLu(domain, text) |
281 return WhoisLu(domain, text) |
282 elif domain.endswith('.cz'): |
282 elif domain.endswith('.cz'): |
283 return WhoisCz(domain, text) |
283 return WhoisCz(domain, text) |
|
284 elif domain.endswith('.online'): |
|
285 return WhoisOnline(domain, text) |
284 else: |
286 else: |
285 return WhoisEntry(domain, text) |
287 return WhoisEntry(domain, text) |
286 |
288 |
287 |
289 |
288 class WhoisSpace(WhoisEntry): |
290 class WhoisSpace(WhoisEntry): |
1457 if '% No entries found.' in text: |
1459 if '% No entries found.' in text: |
1458 raise PywhoisError(text) |
1460 raise PywhoisError(text) |
1459 else: |
1461 else: |
1460 WhoisEntry.__init__(self, domain, text, self.regex) |
1462 WhoisEntry.__init__(self, domain, text, self.regex) |
1461 |
1463 |
|
1464 |
|
1465 class WhoisOnline(WhoisEntry): |
|
1466 """Whois parser for .online domains |
|
1467 """ |
|
1468 regex = { |
|
1469 'domain_name': 'Domain Name: *(.+)', |
|
1470 'domain__id': 'Domain ID: *(.+)', |
|
1471 'whois_server': 'Registrar WHOIS Server: *(.+)', |
|
1472 'registrar': 'Registrar: *(.+)', |
|
1473 'registrar_id': 'Registrar IANA ID: *(.+)', |
|
1474 'registrar_url': 'Registrar URL: *(.+)', |
|
1475 'status': 'Domain Status: *(.+)', |
|
1476 'registrant_email': 'Registrant Email: *(.+)', |
|
1477 'admin_email': 'Admin Email: *(.+)', |
|
1478 'billing_email': 'Billing Email: *(.+)', |
|
1479 'tech_email': 'Tech Email: *(.+)', |
|
1480 'name_servers': 'Name Server: *(.+)', |
|
1481 'creation_date': 'Creation Date: *(.+)', |
|
1482 'expiration_date': 'Registry Expiry Date: *(.+)', |
|
1483 'updated_date': 'Updated Date: *(.+)', |
|
1484 'dnssec': 'DNSSEC: *([\S]+)' |
|
1485 } |
|
1486 |
|
1487 def __init__(self, domain, text): |
|
1488 if 'Not found:' in text: |
|
1489 raise PywhoisError(text) |
|
1490 else: |
|
1491 WhoisEntry.__init__(self, domain, text, self.regex) |