adblockparser
adblockparser copied to clipboard
Python parser for Adblock Plus filters
I can't get any of the easylists to work at all? ``` >>> with open('fanboy_social_general_block.txt', 'rb') as f: ... raw_rules = f.read().decode('utf8').splitlines() >>> rules = AdblockRules(raw_rules) >>> rules.should_block("http://www.facebook.com") False ```...
The regex at https://github.com/scrapinghub/adblockparser/blob/4089612d65018d38dbb88dd7f697bcb07814014d/adblockparser/parser.py#L264 appears to be too restrictive. According to https://help.eyeo.com/en/adblockplus/how-to-write-filters#anchors > You might want to block http://example.com/banner.gif as well as https://example.com/banner.gif and http://www.example.com/banner.gif. You can do this by...
I've read [adblockparser pypi](https://pypi.org/project/adblockparser/), and I got a little confused about **Parsing rules with options**. I want to know that whether rules without options(basic rules) would still be processed even...
Hello, Question regarding the line `rule = re.sub("(\|)[^$]", r"\|", rule)` in https://github.com/scrapinghub/adblockparser/blob/master/adblockparser/parser.py#L272 : This would not only escape the pipe sign, but also remove the sign following the pipe. Actual...
Hey, I am getting error then using https://easylist.to/easylist/easyprivacy.txt Would be great to get the rule that is erroneous in the error message. ` with open('easyprivacy.txt', 'rb') as f: content =...
Rules with `badfilter` should be used to eliminate bad rules. https://github.com/gorhill/uBlock/wiki/Static-filter-syntax#badfilter This is needed to use https://github.com/uBlockOrigin/uAssets/blob/master/filters/unbreak.txt