From 85abc535431f825f07c76f4e1732de98e62d93cf Mon Sep 17 00:00:00 2001 From: Minoplhy Date: Sun, 12 Dec 2021 19:09:42 +0700 Subject: [PATCH] Adblock: Add more regex --- to-rpz/adguard-host-wildcards_rpz_argv.py | 2 +- to-rpz/adguard-host_rpz_argv.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/to-rpz/adguard-host-wildcards_rpz_argv.py b/to-rpz/adguard-host-wildcards_rpz_argv.py index 5d70e98..e64c57c 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('(..*#..*)|(@@\|\|..*)|(\|\|..*\/..*)|(^\/..*)|(^..*\$app=..*)|(^..*\$removeparam=..*)|(^..\/..*)|(\$..*)|(^\...*)|(^:..*)|(^\|http)|(^@@..*)|(^_..*)|(\*..*)', '', file[i]) + file[i] = sub('(..*#..*)|(@@\|\|..*)|(\|\|..*\/..*)|(^\/..*)|(^..*\$app=..*)|(^..*\$removeparam=..*)|(^..\/..*)|(\$..*)|(^\...*)|(^:..*)|(^\|http)|(^@@..*)|(^_..*)|(\*..*)|(^\&..*)|(^\-..*)', '', 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 00ccc1e..9ae09e5 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('(..*#..*)|(@@\|\|..*)|(\|\|..*\/..*)|(^\/..*)|(^..*\$app=..*)|(^..*\$removeparam=..*)|(^..\/..*)|(\$..*)|(^\...*)|(^:..*)|(^\|http)|(^@@..*)|(^_..*)|(\*..*)', '', file[i]) + file[i] = re.sub('(..*#..*)|(@@\|\|..*)|(\|\|..*\/..*)|(^\/..*)|(^..*\$app=..*)|(^..*\$removeparam=..*)|(^..\/..*)|(\$..*)|(^\...*)|(^:..*)|(^\|http)|(^@@..*)|(^_..*)|(\*..*)|(^\&..*)|(^\-..*)', '', file[i]) #print(file) with open(infile, 'w') as f1: f1.writelines(["%s\n" % item for item in file])