mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2026-01-03 14:04:51 +00:00
Actually fix the HTML Parser feeding by calling .close() when done
This commit is contained in:
parent
cac0bcabf9
commit
a27dc575e4
1 changed files with 1 additions and 1 deletions
|
|
@ -116,10 +116,10 @@ class HTML:
|
||||||
|
|
||||||
def parse(self, text: str):
|
def parse(self, text: str):
|
||||||
text = utils.add_surrogates(str(text or "").strip())
|
text = utils.add_surrogates(str(text or "").strip())
|
||||||
text = "<p>{}</p>".format(text)
|
|
||||||
|
|
||||||
parser = Parser(self.client)
|
parser = Parser(self.client)
|
||||||
parser.feed(text)
|
parser.feed(text)
|
||||||
|
parser.close()
|
||||||
|
|
||||||
# TODO: OrderedDict to be removed in Python 3.6
|
# TODO: OrderedDict to be removed in Python 3.6
|
||||||
return OrderedDict([
|
return OrderedDict([
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue