Skip to content

Invalid rule easyprivacy.txt + better errors #12

@Northshoot

Description

@Northshoot

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 = f.read().decode('utf8').splitlines() rules = AdblockRules(content)

Error

File "/usr/local/lib/python3.6/site-packages/adblockparser/parser.py", line 306, in __init__ for r in rules File "/usr/local/lib/python3.6/site-packages/adblockparser/parser.py", line 304, in <listcomp> r for r in ( File "/usr/local/lib/python3.6/site-packages/adblockparser/parser.py", line 306, in <genexpr> for r in rules File "/usr/local/lib/python3.6/site-packages/adblockparser/parser.py", line 117, in __init__ self.regex = self.rule_to_regex(rule_text) File "/usr/local/lib/python3.6/site-packages/adblockparser/parser.py", line 233, in rule_to_regex raise AdblockParsingError('Invalid rule') adblockparser.parser.AdblockParsingError: Invalid rule

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions