From 9726b0787298e951458bfc6b88307292674509b7 Mon Sep 17 00:00:00 2001 From: xkww3n Date: Wed, 19 Jun 2024 22:20:30 +0800 Subject: [PATCH] Add ADs domain from v2fly category-ads list --- workers/reject_exclude.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/workers/reject_exclude.py b/workers/reject_exclude.py index 54fa3bc..7036d82 100644 --- a/workers/reject_exclude.py +++ b/workers/reject_exclude.py @@ -9,6 +9,7 @@ from utils.log_decorator import log from utils.rule import strip_adblock from utils.ruleset import batch_dump, patch +from utils.geosite import parse as geosite_parse @log @@ -66,6 +67,10 @@ def build(): src_exclusions.append(line.text) logging.debug(f'(source) Exclude: Added "{line.text}"') + ruleset_rejections_v2fly = geosite_parse(config.PATH_SOURCE_GEOSITE/"category-ads") + ruleset_rejections |= ruleset_rejections_v2fly + logging.info(f"Imported {(len(ruleset_rejections_v2fly))} reject rules from v2fly category-ads list.") + for line in parse_filterlist(src_exclusions): line_stripped = strip_adblock(line) if not line_stripped: