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

Commit c222d63

Browse files
committed
fix by kazan for pl tld to fix missing expire date
1 parent dc3e518 commit c222d63

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

whois/tldDb/tld_regexpr.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,9 +735,13 @@ def xStr(what: str, times: int = 1, firstMandatory: bool = True) -> str:
735735
"registrar": R(r"\nREGISTRAR:\s*(.+)\n"),
736736
"creation_date": R(r"\ncreated:\s*(.+)\n"),
737737
"updated_date": R(r"\nlast modified:\s*(.+)\n"),
738-
"expiration_date": R(r"\noption expiration date:\s*(.+)\n"),
738+
# "expiration_date": R(r"\noption expiration date:\s*(.+)\n"),
739+
# If no "option expiration date:" is present, use "renewal date:", but only
740+
# if it's not not followed by "option expiration date:". google.pl is the test case here
741+
"expiration_date": R(r"(?:\noption expiration date:|renewal date:(?!(?:.|\n)*\noption expiration date:))\s*(.+)\n"),
739742
"name_servers": R(r"nameservers:%s" % xStr(r"(?:\s+(\S+)[^\n]*\n)?", 4)),
740743
"status": R(r"\nStatus:\n\s*(.+)"),
744+
"_test": "google.pl",
741745
}
742746

743747
ZZ["pt"] = {

0 commit comments

Comments
 (0)