python-readability icon indicating copy to clipboard operation
python-readability copied to clipboard

Error when using positive_keywords (or negative_keywords) argument with python >= 3.7

Open nbtravis opened this issue 4 years ago • 1 comments

Got the following error:

File "/usr/local/lib/python3.8/site-packages/readability/readability.py", line 138, in __init__ self.positive_keywords = compile_pattern(positive_keywords) File "/usr/local/lib/python3.8/site-packages/readability/readability.py", line 80, in compile_pattern elif isinstance(elements, re._pattern_type): AttributeError: module 're' has no attribute '_pattern_type'

Looks like re._pattern_type has been removed in 3.7 but there's an easy fix: https://github.com/beetbox/beets/issues/2986

nbtravis avatar Mar 14 '21 22:03 nbtravis

@buriy We need a new release to merge this commit : https://github.com/buriy/python-readability/commit/7f9cf4a83f51f7090e43c5ce49c84ff641bb533b, thanks.

JackieFei avatar Mar 30 '21 09:03 JackieFei