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

update make test #335

Merged
merged 5 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ reformat:
./reformat-code.sh

test:
./test2.py -d google.com
./test2.py -t 2>2 | tee 1

build:
python -m build
Expand Down
11 changes: 8 additions & 3 deletions testwhl.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
import whois

domain = "google.com"
d = whois.query(domain, verbose=True)
print(d.__dict__)
for tld in whois.validTlds():
hint = whois.getTestHint(tld)
if hint:
print(f"# == {hint}")
d = whois.query(hint, verbose=True)
for k,v in d.__dict__.items():
print(f"\t{k}\t{v}")
print("")
2 changes: 1 addition & 1 deletion whois/tldDb/tld_regexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,7 +736,7 @@ def xStr(what: str, times: int = 1, firstMandatory: bool = True) -> str:
"creation_date": R(r"\ncreated:\s*(.+)\n"),
"updated_date": R(r"\nlast modified:\s*(.+)\n"),
# If no "option expiration date:" is present, use "renewal date:", but only
# if it's not not followed by "option expiration date:".
# if it's not not followed by "option expiration date:". google.pl is the test case here
"expiration_date": R(r"(?:\noption expiration date:|renewal date:(?!(?:.|\n)*\noption expiration date:))\s*(.+)\n"),
"name_servers": R(r"nameservers:%s" % xStr(r"(?:\s+(\S+)[^\n]*\n)?", 4)),
"status": R(r"\nStatus:\n\s*(.+)"),
Expand Down