Skip to content

Commit

Permalink
Merge pull request #262 from devnull-mr/co-domain
Browse files Browse the repository at this point in the history
Add new parser for .co domains
  • Loading branch information
richardpenman authored Jan 14, 2025
2 parents e3394db + 7f62cba commit e6c86c1
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions whois/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ def load(domain, text):
return WhoisEdu(domain, text)
elif domain.endswith(".lv"):
return WhoisLv(domain, text)
elif domain.endswith(".co"):
return WhoisCo(domain, text)
else:
return WhoisEntry(domain, text)

Expand Down Expand Up @@ -3429,3 +3431,12 @@ def __init__(self, domain, text):
raise PywhoisError(text)
else:
WhoisEntry.__init__(self, domain, text, self.regex)

class WhoisCo(WhoisEntry):
"""Whois parser for .co domains"""

def __init__(self, domain, text):
if "No Data Found" in text:
raise PywhoisError(text)
else:
WhoisEntry.__init__(self, domain, text, self.regex)

0 comments on commit e6c86c1

Please sign in to comment.