diff --git a/pythonwhois/net.py b/pythonwhois/net.py index 7d71b87..c538016 100644 --- a/pythonwhois/net.py +++ b/pythonwhois/net.py @@ -77,7 +77,7 @@ def get_whois_raw(domain, server="", previous=None, rfc3490=True, never_cut=Fals # Ignore redirects from registries who publish the registrar data themselves if target_server not in ('whois.nic.xyz',): for line in [x.strip() for x in response.splitlines()]: - match = re.match("(refer|whois server|referral url|whois server|registrar whois):\s*([^\s]+\.[^\s]+)", line, re.IGNORECASE) + match = re.match("(refer|whois server|referral url|registrar whois(?: server)?):\s*([^\s]+\.[^\s]+)", line, re.IGNORECASE) if match is not None: referal_server = match.group(2) if referal_server != server and "://" not in referal_server: # We want to ignore anything non-WHOIS (eg. HTTP) for now. diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index cb3286f..9384e04 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -156,7 +156,8 @@ def precompile_regexes_dict(source, flags=0): 'Domain Registrar :\s?(?P.+)', 'Registration Service Provider: (?P.+)', '\tName:\t\s(?P.+)'], - 'whois_server': ['Whois Server:\s?(?P.+)', + 'whois_server': ['Registrar WHOIS Server:\s?(?P.+)', + 'Whois Server:\s?(?P.+)', 'Registrar Whois:\s?(?P.+)'], 'nameservers': ['Name Server:[ ]*(?P[^ ]+)', 'Nameservers:[ ]*(?P[^ ]+)',