From 568e7d7dd239fe09c7399e40e9306da549631168 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 5 Apr 2020 20:46:04 +0200 Subject: [PATCH] feeds: make BS's output bytes for lxml's sake --- morss/feeds.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/morss/feeds.py b/morss/feeds.py index d92ff43..9eee168 100644 --- a/morss/feeds.py +++ b/morss/feeds.py @@ -442,7 +442,7 @@ class ParserHTML(ParserXML): def parse(self, raw): parser = etree.HTMLParser(remove_blank_text=True) # remove_blank_text needed for pretty_print - return etree.fromstring(BeautifulSoup(raw, 'lxml').prettify(), parser) + return etree.fromstring(BeautifulSoup(raw, 'lxml').prettify('utf-8'), parser) def tostring(self, encoding='unicode', **k): return lxml.html.tostring(self.root, encoding=encoding, **k)