diff --git a/to-rpz/adguard-host-wildcards_rpz_argv.py b/to-rpz/adguard-host-wildcards_rpz_argv.py index 10639e7..9fd2b11 100644 --- a/to-rpz/adguard-host-wildcards_rpz_argv.py +++ b/to-rpz/adguard-host-wildcards_rpz_argv.py @@ -9,7 +9,7 @@ outfile = sys.argv[2] with open(infile) as f: file = f.read().split('\n') for i in range(len(file)): - file[i] = sub('(@@\|\|..*)|(\|\|..*\/..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|@@|\?|\=|\;|\,)..*)|(..*(#|\$)..*)|(^..*\$(app=|removeparam=)..*)|(\|\|..*\/..*)', '', file[i]) + file[i] = sub('(@@\|\|..*)|(\|\|..*(\/|\*(\-|\&|banner|..))..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|@@|\?|\=|\;|\,|\$)..*)|(..*(#|\$|\*)..*)|(^..*\$(app=|removeparam=|popup)..*)(\$..*)', '', file[i]) #print(file) with open(infile, 'w') as f1: f1.writelines(["%s\n" % item for item in file]) diff --git a/to-rpz/adguard-host_rpz_argv.py b/to-rpz/adguard-host_rpz_argv.py index ee943c0..bdf79fd 100644 --- a/to-rpz/adguard-host_rpz_argv.py +++ b/to-rpz/adguard-host_rpz_argv.py @@ -9,7 +9,7 @@ outfile = sys.argv[2] with open(infile) as f: file = f.read().split('\n') for i in range(len(file)): - file[i] = re.sub('(@@\|\|..*)|(\|\|..*\/..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|@@|\?|\=|\;|\,)..*)|(..*(#|\$)..*)|(^..*\$(app=|removeparam=)..*)|(\|\|..*\/..*)', '', file[i]) + file[i] = re.sub('(@@\|\|..*)|(\|\|..*(\/|\*(\-|\&|banner|..))..*)|(^\|http)|(^(_|\*|&|\-|\/|\.|:|@@|\?|\=|\;|\,|\$)..*)|(..*(#|\$|\*)..*)|(^..*\$(app=|removeparam=|popup)..*)(\$..*)', '', file[i]) #print(file) with open(infile, 'w') as f1: f1.writelines(["%s\n" % item for item in file])