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

Commit

Permalink
Merge pull request #334 from kazet/fixing-pl-whois
Browse files Browse the repository at this point in the history
For pl registry, if 'option expiration date' is not present, 'renewaldate' should be treated as the expiry date
  • Loading branch information
maarten-boot authored Nov 2, 2023
2 parents 83112c5 + 0369704 commit 04c1e12
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion whois/tldDb/tld_regexpr.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,9 @@ def xStr(what: str, times: int = 1, firstMandatory: bool = True) -> str:
"registrar": R(r"\nREGISTRAR:\s*(.+)\n"),
"creation_date": R(r"\ncreated:\s*(.+)\n"),
"updated_date": R(r"\nlast modified:\s*(.+)\n"),
"expiration_date": R(r"\noption expiration date:\s*(.+)\n"),
# If no "option expiration date:" is present, use "renewal date:", but only
# if it's not not followed by "option expiration date:".
"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

0 comments on commit 04c1e12

Please sign in to comment.