add encoding attribute to parsed tree

pull/138/head
Adrien Barbaresi 4 years ago
parent 4dcd6f99b2
commit e121faeb2a

@ -159,6 +159,7 @@ class Document:
def _parse(self, input):
if isinstance(input, (_ElementTree, HtmlElement)):
doc = input
self.encoding = 'utf-8'
else:
doc, self.encoding = build_doc(input)
doc = html_cleaner.clean_html(doc)

Loading…
Cancel
Save