We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5800210 commit 15f3692Copy full SHA for 15f3692
1 file changed
readability/htmls.py
@@ -134,7 +134,9 @@ def get_body(doc):
134
elem.drop_tree()
135
# tostring() always return utf-8 encoded string
136
# FIXME: isn't better to use tounicode?
137
- raw_html = str_(tostring(doc.body or doc))
+ raw_html = tostring(doc.body or doc)
138
+ if isinstance(raw_html, bytes):
139
+ raw_html = raw_html.decode()
140
cleaned = clean_attributes(raw_html)
141
try:
142
# BeautifulSoup(cleaned) #FIXME do we really need to try loading it?
0 commit comments