This commit is contained in:
Imre Kristoffer Eilertsen
2023-04-18 14:03:15 +02:00
committed by GitHub
parent 97c6b76ddf
commit 781b322369
2 changed files with 366 additions and 136 deletions
+8 -7
View File
@@ -576,12 +576,6 @@ def prepare_agh(lines) -> str:
line
)
line = re.sub(
r"^\|\|(cdn77\.org|non\.li)\^$",
r"||\1^$dnstype=~CNAME",
line
)
line = re.sub(
r".*\.(png|jpe?g|gif|js|swf)($|\||\^)",
r"",
@@ -901,7 +895,6 @@ def prepare_agh(lines) -> str:
)
# $badfilter-ed entries, as Sublime Text kept complaining about "Ran out of stack space" when I tried to semi-automate it with RegEx.
line = re.sub(
r"^(/adblockpopup\.|/ads\.css|/propads\.|\|\|amgload\.net\^|\|\|desbloqueador\.org\^|\|\|down-paradise\.com\^|\|\|embed\.mystream\.to\^|\|\|fast\.io\^|\|\|fastcontentdelivery\.com\^|\|\|freeadultcomix\.com\^|\|\|hydrax\.net\^|\|\|imfast\.io\^|\|\|klclick\.com\^|\|\|leechpremium\.link\^|\|\|pepsia\.com\^|\|\|piguiqproxy\.com\^|\|\|player-cdn\.com\^|\|\|playhydrax\.com\^|\|\|rcdn\.pro\^|\|\|realfinanceblogcenter\.com\^|\|\|redirect-ads\.com\^|\|\|rule34hentai\.net\^|\|\|shoosh\.co\^|\|\|taobao\.com\^|\|\|template-help\.com\^|\|\|uptodatefinishconferenceroom\.com\^|\|\|wpnrtnmrewunrtok\.xyz\^|\|\|zenaps\.com\^|\|\|zzz\.pissrip\.net\^)(\$badfilter)?$",
r"",
@@ -944,12 +937,20 @@ def prepare_agh(lines) -> str:
line
)
# We are in the year 2023 (or later).
line = re.sub(
r"http://creativecommons\.org/licenses/",
r"https://creativecommons.org/licenses/",
line
)
# AdGuard French Filter bottom section oddities (https://github.com/DandelionSprout/adfilt/issues/837)
line = re.sub(
r"^(\|\||:?/?/)(goal\.com|opensubtitles\.org|hentaibox\.fr\|cdn77\.org)\^?(\$badfilter)$",
r"",
line
)
if is_supported_agh(line) and not line == '':
text += line + '\n'
File diff suppressed because it is too large Load Diff