Skip to content
This repository was archived by the owner on Feb 3, 2024. It is now read-only.

Commit 8ca88ce

Browse files
committed
Add TLD: KG
Kyrgyzstan
1 parent 92028b2 commit 8ca88ce

File tree

3 files changed

+18
-1
lines changed

3 files changed

+18
-1
lines changed

tests/ok-domains.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
google.is
6262
google.it
6363
google.jp
64+
google.kg
6465
google.kn
6566
google.link
6667
google.lt

whois/_3_adjust.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,8 @@ def __init__(
148148
"%Y%m%d%H%M%S", # 20071224102432 used in edu_ua
149149
"%Y-%m-%d %H:%M:%S (%Z%z)", # .tw uses (UTC+8) but we need (UTC+0800) for %z match
150150
"%d %B %Y at %H:%M:%S.%f", # 07 january 2020 at 23:38:30.772
151-
"%Y-%m-%d %H:%M:%S.%f %Z", # 2022-09-18 22:38:18.0 UTC (sn Senegal)
151+
"%Y-%m-%d %H:%M:%S.%f %Z", # 2022-09-18 22:38:18.0 UTC (sn Senegal),
152+
"%a %b %d %H:%M:%S %Y", # Thu Oct 21 05:54:20 2032 (kg Kyrgyzstan)
152153
]
153154

154155
CUSTOM_DATE_FORMATS = {
@@ -184,6 +185,9 @@ def str_to_date(text: str, tld: Optional[str] = None) -> Optional[datetime.datet
184185
# better here https://stackoverflow.com/questions/1258199/python-datetime-strptime-wildcard
185186
text = re.sub(r"(\d+)(st|nd|rd|th) ", r"\1 ", text)
186187

188+
# Remove consecutive whitespace
189+
text = re.sub(r"\s\s+", r" ", text)
190+
187191
# 07 january 2020 at 23:38:30.772
188192
# %d %B %Y at %H:%M %S.%f
189193
if tld and tld in CUSTOM_DATE_FORMATS:

whois/tld_regexpr.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,18 @@
573573
"extend": "com",
574574
}
575575

576+
kg = {
577+
"extend": None,
578+
"domain_name": r"Domain\s(.+)\s\(",
579+
"registrar": r"Billing\sContact:\n.*\n\s+Name:\s(.+)\n",
580+
"registrant_country": None,
581+
"expiration_date": r"Record expires on:\s+(.+)",
582+
"creation_date": r"Record created:\s+(.+)",
583+
"updated_date": r"Record last updated on:\s+(.+)",
584+
"name_servers": None,
585+
"status": None,
586+
}
587+
576588
# Saint Kitts and Nevis
577589
kn = {
578590
"extend": "com",

0 commit comments

Comments
 (0)