From c7026de1413d09f7134c2002d638c515bb38515f Mon Sep 17 00:00:00 2001 From: minoplhy Date: Sun, 12 Dec 2021 17:26:16 +0700 Subject: [PATCH] Crawler: Adblock: support some more syntax --- crawler.py | 1 + 1 file changed, 1 insertion(+) diff --git a/crawler.py b/crawler.py index d354236..507d693 100644 --- a/crawler.py +++ b/crawler.py @@ -82,6 +82,7 @@ def filteringcon(filters_regex_one): with open(filters_regex_one) as f: file = f.read().split('\n') for i in range(len(file)): + file[i] = re.sub('(..*#..*)|(@@\|\|..*)|(\|\|..*\/..*)|(^\/..*)|(^..*\$app=..*)|(^..*\$removeparam=..*)|(^..\/..*)|(\$..*)|(^\...*)|(^:..*)|(^\|http)|(^@@..*)|(^_..*)|(\*..*)', '', file[i]) file[i] = re.sub('0\.0\.0\.0 0\.0\.0\.0\Z', '', file[i]) file[i] = re.sub('\A'+str(IP4)+' ', '', file[i]) file[i] = re.sub('\A'+str(IP6)+' ', '', file[i])