Actually fix the HTML Parser feeding by calling .close() when done

This commit is contained in:
Dan 2019-06-24 14:17:46 +02:00
parent cac0bcabf9
commit a27dc575e4

View File

@ -116,10 +116,10 @@ class HTML:
def parse(self, text: str):
text = utils.add_surrogates(str(text or "").strip())
text = "<p>{}</p>".format(text)
parser = Parser(self.client)
parser.feed(text)
parser.close()
# TODO: OrderedDict to be removed in Python 3.6
return OrderedDict([