adblockparser icon indicating copy to clipboard operation
adblockparser copied to clipboard

Would rules without options be processed and matched if I explicitly list options in AdblockRules constructor?

Open 99hansling opened this issue 3 years ago • 4 comments

I've read adblockparser pypi, 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 if I specify a list of options.

99hansling avatar May 04 '21 10:05 99hansling

Based on the implementation, I would expect rules without options to be always taken into account.

It would be great if you could test it and confirm, though.

We could definitely improve the description in PyPI and the README to be explicit about this.

Gallaecio avatar May 04 '21 11:05 Gallaecio

Based on the implementation, I would expect rules without options to be always taken into account.

It would be great if you could test it and confirm, though.

We could definitely improve the description in PyPI and the README to be explicit about this.

Thanks for your quick response. Plus, I've got another question, hope it won't bother you: Is there a possible way to disable exception rules? I am doing a research requiring me to find all ads on websites, and I'm wondering if it is possible to do so after discard all exception rules.

99hansling avatar May 04 '21 14:05 99hansling

According to https://adblockplus.org/en/filter-cheatsheet#comments you could comment out rules with an exclamation mark. The code seems to handle that as expected, but as with my previous comment, I’m just reading the code, I have not actually tested any of this.

Gallaecio avatar May 04 '21 14:05 Gallaecio

According to https://adblockplus.org/en/filter-cheatsheet#comments you could comment out rules with an exclamation mark. The code seems to handle that as expected, but as with my previous comment, I’m just reading the code, I have not actually tested any of this.

Anyway, thanks a lot!

99hansling avatar May 04 '21 15:05 99hansling