From 2d856f3f8a154ba9e4de4705d4259723024ba6b4 Mon Sep 17 00:00:00 2001 From: Imre Kristoffer Eilertsen Date: Wed, 15 Feb 2023 13:35:31 +0100 Subject: [PATCH] Add files via upload --- .../DandelionSproutsNorskeFiltre.tpl | 15 +-- .../XYZPrepareFilters.py | 94 +++++++++++++++---- 2 files changed, 78 insertions(+), 31 deletions(-) diff --git a/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl b/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl index 96b65dbc6..d392f9fea 100644 --- a/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl +++ b/NorwegianExperimentalList alternate versions/DandelionSproutsNorskeFiltre.tpl @@ -1,7 +1,7 @@ msFilterList # Title: 🏔️ Dandelion Sprouts nordiske filtre for ryddigere nettsider # Translated title: Dandelion Sprout's Nordic filters for tidier websites -# Version: 12February2023v1-Alpha +# Version: 12February2023v1-Deprecated : expires = 1 # Lisens Licence: https://github.com/DandelionSprout/adfilt/blob/master/LICENSE.md # Homepage: https://github.com/DandelionSprout/adfilt/blob/master/Wiki/General-info.md @@ -58,7 +58,6 @@ msFilterList - banners casinotop # gnavergalleri.dk (along with ~60 affiliates sites) # https://github.com/DandelionSprout/adfilt/issues/233 -*galleri.dk content images fixed # sol.dk (25 04 2021) # bilgalleri.dk (25 04 2021) # forum.ipmsnorge.org (24 05 2021) @@ -853,7 +852,6 @@ msFilterList -d smsb.co # https://github.com/DandelionSprout/adfilt/issues/747 - -norge.co.no -*skodanmark.com -d skechersskosalg-norge.com -d dkgaborsneakers.com -d haglofstilbud.com @@ -914,17 +912,6 @@ msFilterList -d hoka-sko.com -d hoka-one-one.cc -d hokaoneone* -*norgeskosalg. -*norge-salg.com -*norgesalg.com -*norgesalgs.com -*salgnorge.com -*danmarkdk.com -*skodktilbud. -*skonorgeeu.com -*sneakersnorgeshop. -*sneakersdkshop.com -*skodanmarks. # IP addresses of servers notorious for hosting many of the sites above -d 51.195.133.131 -d 66.206.3.34 diff --git a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py index e6f1b63fd..ace11c8e4 100644 --- a/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py +++ b/NorwegianExperimentalList alternate versions/XYZPrepareFilters.py @@ -184,6 +184,12 @@ def prepare_ag(lines) -> str: line ) + line = re.sub( + r",~inline-script,~inline-font$", + r"", + line + ) + text += line + '\r\n' return text @@ -1069,7 +1075,7 @@ def prepare_tpl(lines) -> str: line = re.sub( r"(# Version: .*[0-9][A-Z].*)", - r"\1-Alpha", + r"\1-Deprecated", line ) @@ -1218,8 +1224,8 @@ def prepare_tpl(lines) -> str: ) line = re.sub( - r"^#.*PFBLOCKERNG.*", - r"# Pretty important note: Documentation for TPL lists is atrociously bad, and often contradict themselves and omit important details. It wasn't until March 2020 that I discovered that TPL lists refuse to block first-party files, making more than half of this list useless, although it may have a slight effect on some newssites. If you just need a browser to play Flash games on, please switch to Waterfox Classic. If you have to use IE at work, you should either install AdGuard for Windows, or quit the job on the spot in protest against ancient technology.", + r"^(Description: .*)", + r"\1\n# Pretty important note: Documentation for TPL lists is atrociously bad, and often contradict themselves and omit important details. It wasn't until March 2020 that I discovered that TPL lists refuse to block first-party files, making more than half of this list useless, although it may have a slight effect on some newssites. If you just need a browser to play Flash games on, please switch to Waterfox Classic. If you have to use IE at work, you should either install AdGuard for Windows, or quit the job on the spot in protest against ancient technology.", line ) @@ -1337,6 +1343,12 @@ def prepare_tpl(lines) -> str: line ) + line = re.sub( + r"^\*.*", + r"", + line + ) + if is_supported_tpl(line) and not line == '': text += line + '\r\n' @@ -4154,7 +4166,7 @@ if __name__ == "__main__": #•X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X••X• #\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/\•/ -SOURCES = ['https://gitlab.com/DandelionSprout/adfilt/-/raw/master/Dandelion%20Sprout\'s%20Anti-Malware%20List.txt'] +SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/Dandelion%20Sprout\'s%20Anti-Malware%20List.txt'] UNSUPPORTED_ABP = ['$important', ',important' '$redirect=', ',redirect=', ':style', '##+js', '.*#' , ':xpath', ':matches-css', 'dk,no##', 'version.bind', 'pizzaseo.com', 'gamecopyworld', '$app'] @@ -4343,6 +4355,12 @@ def prepare_ag(lines) -> str: line ) + line = re.sub( + r",~inline-script,~inline-font$", + r"", + line + ) + line = re.sub( r",~inline-font,~inline-script,~domain=", r",~domain=", @@ -4542,18 +4560,6 @@ def prepare_abp(lines) -> str: line ) - line = re.sub( - r":has-text", - r":-abp-contains", - line - ) - - line = re.sub( - r":has", - r":-abp-has", - line - ) - line = re.sub( r"^\*#.*", r"", @@ -4579,7 +4585,7 @@ def prepare_abp(lines) -> str: ) line = re.sub( - r"([a-z])##([#.]?[a-z_].*:-abp-)", + r"([a-z])##([#.]?[a-z_].*:has)", r"\1#?#\2", line ) @@ -4596,12 +4602,24 @@ def prepare_abp(lines) -> str: line ) + line = re.sub( + r",~inline-script,~inline-font$", + r"", + line + ) + line = re.sub( r"-,popup$", r"-", line ) + line = re.sub( + r".*\$network$", + r"", + line + ) + if is_supported_abp(line): text += line + '\r\n' @@ -4971,6 +4989,42 @@ def prepare_tpl(lines) -> str: line ) + line = re.sub( + r"^\^ \\..*", + r"", + line + ) + + line = re.sub( + r"^[0-9&].*", + r"", + line + ) + + line = re.sub( + r"^://", + r"-d ", + line + ) + + line = re.sub( + r"^- \(.*", + r"", + line + ) + + line = re.sub( + r"^!\+.*", + r"", + line + ) + + line = re.sub( + r"^(# Version: .*[0-9])$", + r"\1-Deprecated", + line + ) + if is_supported_tpl(line): text += line + '\r\n' @@ -5101,6 +5155,12 @@ def prepare_privoxy(lines) -> str: line ) + line = re.sub( + r"^(# Version: .*[0-9])$", + r"\1-Deprecated", + line + ) + if is_supported_privoxy(line): text += line + '\r\n'