adblockparser icon indicating copy to clipboard operation
adblockparser copied to clipboard

Easylist no longer supported?

Open gonedjur opened this issue 6 years ago • 2 comments

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
>>> with open('easylist.txt', 'rb') as f:
...     raw_rules = f.read().decode('utf8').splitlines()
>>> rules = AdblockRules(raw_rules)
>>> rules.should_block("http://ads.example.com")
False

Any ideas? Are they no longer compatible?

gonedjur avatar Apr 30 '18 08:04 gonedjur

@gonedjur Have you tried passing the third-party argument in options?

>>> from adblockparser import AdblockRules
>>> AdblockRules(['||example.com^$third-party']).should_block('example.com')
False
>>> AdblockRules(['||example.com^$third-party']).should_block('example.com', {'third-party': True})
True

BookGin avatar Nov 06 '18 20:11 BookGin

I am facing the same problem. Every input returns false despite passing the third-party option in AdblockRules(). @gonedjur Please let me know if you were able to resolve this.

swetang4 avatar Nov 23 '21 00:11 swetang4