Skip to content

Commit 403e726

Browse files
committed
fix .kg parsing
1 parent f086010 commit 403e726

3 files changed

Lines changed: 43 additions & 2 deletions

File tree

test/samples/expected/google.kg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"domain_name": "GOOGLE.KG", "expiration_date": "2026-03-28 23:59:00+00:00", "updated_date": "2025-03-05 00:13:49+00:00", "registrar": null, "registrar_url": null, "creation_date": "2004-02-10 09:42:42+00:00", "status": null}

test/samples/whois/google.kg

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
% This is the .kg ccTLD Whois server
2+
% Register your own domain at https://www.cctld.kg
3+
% Whois web service - https://www.cctld.kg/whois
4+
5+
Domain GOOGLE.KG (ACTIVE)
6+
7+
Administrative Contact:
8+
PID: AI-44973-KG
9+
Name:
10+
Address: United States Mountain View 1600 Amphitheatre Parkway N/A
11+
Email: dns-admin@google.com
12+
phone: 16502530000
13+
fax: +1.6502530001
14+
15+
Technical Contact:
16+
PID: AI-44973-KG
17+
Name:
18+
Address: United States Mountain View 1600 Amphitheatre Parkway N/A
19+
Email: dns-admin@google.com
20+
phone: 16502530000
21+
fax: +1.6502530001
22+
23+
Billing Contact:
24+
PID: 5935-KG
25+
Name:
26+
Address: United States Meridian 1120 S. Rackham Way Suite 300
27+
Email: ccops@markmonitor.com
28+
phone: +12083895740
29+
fax: +12083895771
30+
31+
32+
Record created: Tue Feb 10 09:42:42 2004
33+
Record last updated on: Wed Mar 5 00:13:49 2025
34+
Record expires on: Sat Mar 28 23:59:00 2026
35+
36+
Name servers in the listed order:
37+
38+
NS1.GOOGLE.COM
39+
NS2.GOOGLE.COM
40+
NS4.GOOGLE.COM

whois/parser.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1730,8 +1730,8 @@ class WhoisKg(WhoisEntry):
17301730
"name_servers": r"Name servers in the listed order: *([\d\w\.\s]+)",
17311731
# 'name_servers': r'([\w]+\.[\w]+\.[\w]{2,5}\s*\d{1,3}\.\d]{1,3}\.[\d]{1-3}\.[\d]{1-3})',
17321732
"creation_date": r"Record created: *(.+)",
1733-
"expiration_date": r"Record expires on \s*(.+)",
1734-
"updated_date": r"Record last updated on\s*(.+)",
1733+
"expiration_date": r"Record expires on:\s*(.+)",
1734+
"updated_date": r"Record last updated on:\s*(.+)",
17351735
}
17361736

17371737
def __init__(self, domain: str, text: str):

0 commit comments

Comments
 (0)