mirror of
https://github.com/DandelionSprout/adfilt.git
synced 2026-10-04 22:04:19 +01:00
Merge pull request #329 from rusty-snake/patch-2
Fix https://github.com/DandelionSprout/adfilt/issues/63#issuecomment-962655082
This commit is contained in:
@@ -147,15 +147,16 @@ def main() -> int:
|
||||
}
|
||||
|
||||
# TODO:
|
||||
# - Dollars
|
||||
# $removeparam=\$original_url,domain=reddit.co
|
||||
# - URL encoded
|
||||
# $removeparam=%24deep_link,domain=reddit.com
|
||||
# - Better is_regex
|
||||
# $removeparam=/^p\[\]=/,domain=flipkart.com
|
||||
for url_pattern, rules in providers.items():
|
||||
url_pattern = normalize_url_pattern(url_pattern)
|
||||
rules = [rule.replace("(?:%3F)?", "", 1).replace("(?:", "(") for rule in rules]
|
||||
rules = [
|
||||
rule.replace("(?:%3F)?", "", 1).replace("(?:", "(").replace(r"\$", r"\x24")
|
||||
for rule in rules
|
||||
]
|
||||
if url_pattern == ".*":
|
||||
write_rules(
|
||||
url_pattern,
|
||||
|
||||
Reference in New Issue
Block a user