From 0503b43375b90165b2d761156ff807a248a727d8 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 6 Oct 2014 02:58:00 +0200 Subject: [PATCH] When looking for nameserver blocks, also allow end-of-string in addition to a double newline. Fixes #43. --- pythonwhois/parse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythonwhois/parse.py b/pythonwhois/parse.py index 34f63fc..1f74754 100644 --- a/pythonwhois/parse.py +++ b/pythonwhois/parse.py @@ -451,7 +451,7 @@ def parse_raw_whois(raw_data, normalized=None, never_query_handles=True, handle_ data[rule_key] = [val] # Whois.com is a bit special... Fabulous.com also seems to use this format. As do some others. - match = re.search("^\s?Name\s?[Ss]ervers:?\s*\n((?:\s*.+\n)+?\s?)\n", segment, re.MULTILINE) + match = re.search("^\s?Name\s?[Ss]ervers:?\s*\n((?:\s*.+\n)+?\s?)(?:\n|$)", segment, re.MULTILINE) if match is not None: chunk = match.group(1) for match in re.findall("[ ]*(.+)\n", chunk):