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

Commit d4c6cf5

Browse files
committed
add tld st, so, nrw, lat, so , realestate, ph, com.ph, org.ph, net.ph, zm; retract cleanup on >>> it appears to early on google.st
1 parent 642daca commit d4c6cf5

File tree

4 files changed

+27
-3
lines changed

4 files changed

+27
-3
lines changed

DONE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ DONE
1616
- add skipFromHere in _2_parse.py: lines starting with ^>>> signify the end of a normal whois response
1717
after this line there is only human or legal information so we can simply skip that text
1818
(a similar construct with ^--\s will be done later)
19+
(( retracted we have domains where this is very early: switched off for now, make this configurable ))
1920

2021
- add commment that unfortunately we cannot currently use rtrim on input from whois response and may regexes expect
2122
either \r or trailing whitespace, this can be done later and would make many regexes simpler in end detection
@@ -32,4 +33,5 @@ DONE
3233

3334
- add -t <tld> and -d <dmian> to makeTastdataAll support a cusom domain and not meta, google default
3435

36+
- add tld st, so, nrw, lat, so , realestate, ph, com.ph, org.ph, net.ph, zm
3537

whois/_2_parse.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,11 @@ def cleanupWhoisResponse(
9494

9595
# regular responses may at the end have meta info starting with a line >>> some texte <<<
9696
# similar trailing info exists with lines starting with -- but we wil handle them later
97-
if line.startswith(">>>"):
98-
skipFromHere = True
99-
continue
97+
# unfortunalery we have domains (google.st) that have this early at the top
98+
if 0:
99+
if line.startswith(">>>"):
100+
skipFromHere = True
101+
continue
100102

101103
if line.startswith("Terms of Use:"): # these lines contibute nothing so ignore
102104
continue

whois/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,10 @@
7171
".com.sg": "com_sg",
7272
".com.do": "com_do",
7373
".com.mo": "com_mo",
74+
# ph
75+
".com.ph": "com_ph",
76+
".org.ph": "org_ph",
77+
".net.ph": "net_ph",
7478
#
7579
# TÜRKİYE (formerly Turkey)
7680
".com.tr": "com_tr",

whois/tld_regexpr.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1992,3 +1992,19 @@
19921992
"name_servers": r"Domain name servers:\s*\-+(?:\s*(\S+)\n)(?:\s*(\S+)\n)?(?:\s*(\S+)\n)?(?:\s*(\S+)\n)?",
19931993
}
19941994
com_mo = { "extend": "mo"}
1995+
st = {
1996+
# .ST domains can now be registered with many different competing registrars. and hence different formats
1997+
"extend": "com",
1998+
"registrant_country": r"registrant-country:\s+(\S+)",
1999+
"registrant": r"registrant-organi(?:s|z)ation:\s*(.+)\r?\n",
2000+
}
2001+
so = { "extend": "com" }
2002+
nrw = { "extend": "com" }
2003+
lat = { "extend": "com" }
2004+
realestate = { "_server": "whois.nic.realestate", "extend": "com" }
2005+
ph = {"extend": "_privateReg"}
2006+
com_ph = {"extend": "ph"}
2007+
org_ph= {"extend": "ph"}
2008+
net_ph= {"extend": "ph"}
2009+
zm = { "extend": "com" }
2010+

0 commit comments

Comments
 (0)