We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 022d711 + 15f3692 commit b679ff7Copy full SHA for b679ff7
1 file changed
readability/htmls.py
@@ -143,7 +143,9 @@ def get_body(doc):
143
elem.drop_tree()
144
# tostring() always return utf-8 encoded string
145
# FIXME: isn't better to use tounicode?
146
- raw_html = str_(tostring(doc.body or doc))
+ raw_html = tostring(doc.body or doc)
147
+ if isinstance(raw_html, bytes):
148
+ raw_html = raw_html.decode()
149
cleaned = clean_attributes(raw_html)
150
try:
151
# BeautifulSoup(cleaned) #FIXME do we really need to try loading it?
0 commit comments