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

Commit 04c1e12

Browse files
authored
Merge pull request #334 from kazet/fixing-pl-whois
For pl registry, if 'option expiration date' is not present, 'renewaldate' should be treated as the expiry date
2 parents 83112c5 + 0369704 commit 04c1e12

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

whois/tldDb/tld_regexpr.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,9 @@ 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+
# If no "option expiration date:" is present, use "renewal date:", but only
739+
# if it's not not followed by "option expiration date:".
740+
"expiration_date": R(r"(?:\noption expiration date:|renewal date:(?!(?:.|\n)*\noption expiration date:))\s*(.+)\n"),
739741
"name_servers": R(r"nameservers:%s" % xStr(r"(?:\s+(\S+)[^\n]*\n)?", 4)),
740742
"status": R(r"\nStatus:\n\s*(.+)"),
741743
}

0 commit comments

Comments
 (0)