From a27dc575e413968f8814a7fb365bf7f2ada9aaa6 Mon Sep 17 00:00:00 2001 From: Dan <14043624+delivrance@users.noreply.github.com> Date: Mon, 24 Jun 2019 14:17:46 +0200 Subject: [PATCH] Actually fix the HTML Parser feeding by calling .close() when done --- pyrogram/client/style/html.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrogram/client/style/html.py b/pyrogram/client/style/html.py index df7c64ff..1748fa58 100644 --- a/pyrogram/client/style/html.py +++ b/pyrogram/client/style/html.py @@ -116,10 +116,10 @@ class HTML: def parse(self, text: str): text = utils.add_surrogates(str(text or "").strip()) - text = "

{}

".format(text) parser = Parser(self.client) parser.feed(text) + parser.close() # TODO: OrderedDict to be removed in Python 3.6 return OrderedDict([