From 1b50bce12c54f6c6fa340f8150adee961762f15f Mon Sep 17 00:00:00 2001 From: Lev Date: Sun, 23 Sep 2018 11:46:40 +0300 Subject: [PATCH 1/2] Expire date support for israeli domains --- pythonwhois/parse.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index 66217d6..b525ebb 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -105,6 +105,7 @@ def precompile_regexes(source, flags=0): 'expiration_date:\s*(?P.+)', 'expire-date:\s*(?P.+)', 'renewal:\s*(?P.+)', + 'validity:\s*(?P.+)', 'expire:\s*(?P.+)'], 'updated_date': ['\[Last Updated\]\s*(?P.+)', 'Record modified on[.]*: (?P.+) [a-zA-Z]+', From e1123d8a6a1e7814b960e07bbbdd1c9b0b721da3 Mon Sep 17 00:00:00 2001 From: levcovenant <42414087+levcovenant@users.noreply.github.com> Date: Tue, 3 Mar 2020 17:03:35 +0200 Subject: [PATCH 2/2] fixed error with regex on python3.7 source: https://github.com/joepie91/python-whois/issues/142 --- pythonwhois/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index b525ebb..c492a62 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -203,7 +203,7 @@ def precompile_regexes(source, flags=0): def preprocess_regex(regex): # Fix for #2; prevents a ridiculous amount of varying size permutations. - regex = re.sub(r"\\s\*\(\?P<([^>]+)>\.\+\)", r"\s*(?P<\1>\S.*)", regex) + regex = re.sub(r"\\s\*\(\?P<([^>]+)>\.\+\)", r"\\s*(?P<\1>\\S.*)", regex) # Experimental fix for #18; removes unnecessary variable-size whitespace # matching, since we're stripping results anyway. regex = re.sub(r"\[ \]\*\(\?P<([^>]+)>\.\*\)", r"(?P<\1>.*)", regex)