From 780e96c9ff7823b31eb827e6ee27bd56253fd765 Mon Sep 17 00:00:00 2001 From: minoplhy Date: Fri, 13 Aug 2021 15:30:37 +0700 Subject: [PATCH] '.' line issue solved --- crawler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crawler.py b/crawler.py index 26c3b71..e9d2a18 100644 --- a/crawler.py +++ b/crawler.py @@ -75,6 +75,7 @@ def filteringcon(filters_regex_one): file[i] = re.sub('#..*', '', file[i]) file[i] = re.sub('CNAME . ;..*', '', file[i]) file[i] = re.sub(';..*', '', file[i]) + file[i] = re.sub('\A^\.' ,'' ,file[i]) with open(filters_regex_one, 'w') as f1: f1.writelines(["%s\n" % item for item in file]) f.close()