Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pythonwhois/net.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion pythonwhois/parse.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,8 @@ def precompile_regexes_dict(source, flags=0):
'Domain Registrar :\s?(?P<val>.+)',
'Registration Service Provider: (?P<val>.+)',
'\tName:\t\s(?P<val>.+)'],
'whois_server': ['Whois Server:\s?(?P<val>.+)',
'whois_server': ['Registrar WHOIS Server:\s?(?P<val>.+)',
'Whois Server:\s?(?P<val>.+)',
'Registrar Whois:\s?(?P<val>.+)'],
'nameservers': ['Name Server:[ ]*(?P<val>[^ ]+)',
'Nameservers:[ ]*(?P<val>[^ ]+)',
Expand Down