mirror of
https://github.com/DandelionSprout/adfilt.git
synced 2026-10-05 22:04:30 +01:00
Add files via upload
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import requests
|
||||
import re
|
||||
|
||||
SOURCES = ['https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt', 'https://raw.githubusercontent.com/NanoAdblocker/NanoFilters/master/NanoMirror/NanoDefender.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt', 'https://easylist-downloads.adblockplus.org/liste_fr.txt', 'https://www.i-dont-care-about-cookies.eu/abp/']
|
||||
SOURCES = ['https://easylist-downloads.adblockplus.org/easylist_noelemhide.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/filters.txt', 'https://raw.githubusercontent.com/NanoAdblocker/NanoFilters/master/NanoMirror/NanoDefender.txt', 'https://raw.githubusercontent.com/uBlockOrigin/uAssets/master/filters/badware.txt', 'https://easylist-downloads.adblockplus.org/liste_fr.txt', 'https://www.i-dont-care-about-cookies.eu/abp/', 'https://easylist-downloads.adblockplus.org/easylistgermany.txt', 'https://easylist-downloads.adblockplus.org/abp-filters-anti-cv.txt']
|
||||
|
||||
UNSUPPORTED_AGH = ['/', '##', '@#', '#?#', 'domain=', 'generichide', '$csp', 'badfilter', 'xmlhttprequest', '$xhr', '$stylesheet', '~image', '$elemhide', '$inline-script', '$other', '$~object', 'redirect=']
|
||||
UNSUPPORTED_AGH = ['/', '##', '@#', '#?#', 'domain=', 'generichide', '$csp', 'badfilter', 'xmlhttprequest', '$xhr', '$stylesheet', '~image', '$elemhide', '$inline-script', '$other', '$~object', 'redirect=', '#$#']
|
||||
|
||||
OUTPUT = 'xyzzyx.txt'
|
||||
OUTPUT_AGH = 'AdGuardHomeCompilationList.txt'
|
||||
@@ -178,6 +178,18 @@ def prepare_agh(lines) -> str:
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^\|[a-z0-9].*",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
line = re.sub(
|
||||
r"^;[a-z0-9].*",
|
||||
"",
|
||||
line
|
||||
)
|
||||
|
||||
if is_supported_agh(line) and not line == '':
|
||||
text += line + '\r\n'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user