Crawler: support '~' regex

This commit is contained in:
minoplhy 2022-01-15 15:04:46 +07:00
parent b7cac94b12
commit 1204257828
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('(@@\|\|..*)|(\|\|..*(\/|\*(\-|\&|banner|..))..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|@@|\?|\=|\;|\,|\$)..*)|(..*(#|\$|\*)..*)|(^..*\$(app=|removeparam=|popup)..*)(\$..*)', '', file[i])
file[i] = re.sub('/(@@\|\|..*)|(\|\|..*(\/|\*(\-|\&|banner|..))..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|@@|\?|\=|\;|\,|\$|\~)..*)|(..*(#|\$|\*)..*)|(^..*\$(app=|removeparam=|popup)..*)(\$..*)/gm', '', 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])