Skip to content

Commit 0503b43

Browse files
committed
When looking for nameserver blocks, also allow end-of-string in addition to a double newline. Fixes joepie91#43.
1 parent 369dff7 commit 0503b43

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonwhois/parse.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ def parse_raw_whois(raw_data, normalized=None, never_query_handles=True, handle_
451451
data[rule_key] = [val]
452452

453453
# Whois.com is a bit special... Fabulous.com also seems to use this format. As do some others.
454-
match = re.search("^\s?Name\s?[Ss]ervers:?\s*\n((?:\s*.+\n)+?\s?)\n", segment, re.MULTILINE)
454+
match = re.search("^\s?Name\s?[Ss]ervers:?\s*\n((?:\s*.+\n)+?\s?)(?:\n|$)", segment, re.MULTILINE)
455455
if match is not None:
456456
chunk = match.group(1)
457457
for match in re.findall("[ ]*(.+)\n", chunk):

0 commit comments

Comments
 (0)