mirror of
https://github.com/TeamPGM/pyrogram.git
synced 2024-11-16 20:59:29 +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):
|
||||
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([
|
||||
|
Loading…
Reference in New Issue
Block a user