From 46a196c3c415320beef945810e3b2bfb6f6557ca Mon Sep 17 00:00:00 2001 From: relikd Date: Wed, 23 Sep 2020 15:27:09 +0200 Subject: [PATCH] Fix 3rd level domain check fail --- src/common_lib.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common_lib.py b/src/common_lib.py index 0e40e3e..407b353 100755 --- a/src/common_lib.py +++ b/src/common_lib.py @@ -118,7 +118,7 @@ def parent_domain(subdomain): global _list_TLD if not _list_TLD: with open(path_root('src', '3rd-domains.txt'), 'r') as fp: - _list_TLD = fp.readlines() # assuming lines have no whitespace + _list_TLD = [x.strip() for x in fp.readlines()] return bintree_lookup(_list_TLD, needle) parts = subdomain.split('.')