mirror of
https://github.com/DandelionSprout/adfilt.git
synced 2026-10-05 22:04:30 +01:00
Update nordic_prepare_filters.py
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
import requests
|
||||
import re
|
||||
|
||||
SOURCES = ['https://raw.githubusercontent.com/DandelionSprout/adfilt/master/NorwegianList.txt']
|
||||
SOURCES = ['https://gitlab.com/DandelionSprout/adfilt/raw/master/NorwegianList.txt']
|
||||
|
||||
UNSUPPORTED_ABP = ['$document', '$important', ',important' '$redirect=', ',redirect=',
|
||||
':style', '##+js', '.*#' , ':xpath', ':matches-css', 'dk,no##']
|
||||
|
||||
UNSUPPORTED_TPL = ['##', '#@#', '#?#', r'\.no\.$']
|
||||
|
||||
OUTPUT = 'filter.txt'
|
||||
OUTPUT = 'xyzzyx.txt'
|
||||
OUTPUT_AG = 'NordicFiltersAdGuard.txt'
|
||||
OUTPUT_ABP = 'NordicFiltersABP.txt'
|
||||
OUTPUT_TPL = 'DandelionSproutsNorskeFiltre.tpl'
|
||||
@@ -59,6 +59,12 @@ def prepare_ag(lines) -> str:
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"! Redirect:.*",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
text += line + '\r\n'
|
||||
|
||||
return text
|
||||
|
||||
Reference in New Issue
Block a user