1
0
mirror of https://github.com/minoplhy/filters-maker.git synced 2024-12-22 10:08:11 +00:00

Crawler: Adblock: Add more regex

This commit is contained in:
minoplhy 2021-12-12 19:10:22 +07:00
parent c7026de141
commit 23afcfce21
Signed by: minoplhy
GPG Key ID: 90667A59A9908AEC

View File

@ -82,7 +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('(..*#..*)|(@@\|\|..*)|(\|\|..*\/..*)|(^\/..*)|(^..*\$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])