Skip to content

Commit 16ce81d

Browse files
committed
Update cleaners.py
1 parent c157445 commit 16ce81d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

readability/cleaners.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# strip out a set of nuisance html attributes that can mess up rendering in RSS feeds
22
import re
3-
from lxml.html.clean import Cleaner
3+
try:
4+
from lxml.html.clean import Cleaner
5+
except ImportError:
6+
from lxml_html_clean import Cleaner
47

58
bad_attrs = ["width", "height", "style", "[-a-z]*color", "background[-a-z]*", "on*"]
69
single_quoted = "'[^']+'"

0 commit comments

Comments
 (0)