mirror of
https://github.com/pyrogram/pyrogram
synced 2025-08-28 21:07:59 +00:00
Actually fix the HTML Parser feeding by calling .close() when done
This commit is contained in:
parent
cac0bcabf9
commit
a27dc575e4
@ -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…
x
Reference in New Issue
Block a user