From 6c3ee34e8e7443a56ccb2b84443a7b62489f3b97 Mon Sep 17 00:00:00 2001 From: minoplhy Date: Sat, 2 Oct 2021 16:50:33 +0700 Subject: [PATCH] Open and End --- crawler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crawler.py b/crawler.py index 81a32c3..583716e 100644 --- a/crawler.py +++ b/crawler.py @@ -52,7 +52,7 @@ def IP_URL_FILTERING(filters_welcome): file[i] = re.sub(':(\d\d\d\d\d|\d\d\d\d|\d\d\d|\d\d|\d)', '', file[i]) file[i] = re.sub('\A'+str(IP4)+'\Z', '', file[i]) file[i] = re.sub('\A(\[|)'+str(IP6)+'(\]|)\Z', '', file[i]) - file[i] = re.sub('\[..*\]', '', file[i]) + file[i] = re.sub('\A\[..*\]\Z', '', file[i]) with open(filters_welcome, 'w') as f1: f1.writelines(["%s\n" % item for item in file]) print("Ip Address and Url Path filtering Operation Completed!")