Skip to content

Commit

Permalink
Merge pull request #258 from hedgieinsocks/small_parser_fixes
Browse files Browse the repository at this point in the history
Small fixes for .AI, .SITE, .DESIGN parsers
  • Loading branch information
richardpenman authored Jan 13, 2025
2 parents 0248325 + 92b3148 commit fb31b69
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 8 additions & 0 deletions test/test_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,9 @@ def test_ai_parse(self):
Registry Domain ID: 325702_nic_ai
Registry WHOIS Server: whois.nic.ai
Creation Date: 2017-12-16T05:37:20.801Z
Domain Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
Domain Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
Domain Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
Registrar: Markmonitor
Registrar Abuse Contact Email: [email protected]
Registrar Abuse Contact Phone: +1.2083895740
Expand Down Expand Up @@ -266,6 +269,11 @@ def test_ai_parse(self):
"tech_phone": "+1.6502530000",
"tech_postal_code": "94043",
"tech_state": "CA",
"status": [
"clientTransferProhibited https://icann.org/epp#clientTransferProhibited",
"clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited",
"clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited"
],
}
self._parse_and_compare("google.ai", data, expected_results)

Expand Down
5 changes: 3 additions & 2 deletions whois/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2077,6 +2077,7 @@ class WhoisAi(WhoisEntry):
regex = {
"domain_name": r"Domain Name\s*:\s*(.+)",
"domain_id": r"Registry Domain ID\s*:\s*(.+)",
"status": r"Domain Status:\s*(.+)",
"creation_date": r"Creation Date:\s*(.+)",
"registrar": r"Registrar:\s*(.+)",
"registrar_phone": r"Registrar Abuse Contact Phone:\s*(.+)",
Expand Down Expand Up @@ -3340,7 +3341,7 @@ class WhoisSite(WhoisEntry):
"whois_server": r"Whois Server: *(.+)",
"updated_date": r"Updated Date: *(.+)",
"creation_date": r"Creation Date: *(.+)",
"expiration_date": r"Registrar Registration Expiration Date: *(.+)",
"expiration_date": r"Registry Expiry Date: *(.+)",
"name_servers": r"Name Server: *(.+)", # list of name servers
"status": r"Domain Status: *(.+)", # list of statuses
"emails": EMAIL_REGEX, # list of email s
Expand Down Expand Up @@ -3370,7 +3371,7 @@ class WhoisDesign(WhoisEntry):
"whois_server": r"Registrar WHOIS Server: *(.+)",
"updated_date": r"Updated Date: *(.+)",
"creation_date": r"Creation Date: *(.+)",
"expiration_date": r"Registrar Registration Expiration Date: *(.+)",
"expiration_date": r"Registry Expiry Date: *(.+)",
"name_servers": r"Name Server: *(.+)", # list of name servers
"status": r"Domain Status: *(.+)", # list of statuses
"emails": EMAIL_REGEX, # list of email s
Expand Down

0 comments on commit fb31b69

Please sign in to comment.