From d40720616b0c74c7b1138626340b1dfd250998d4 Mon Sep 17 00:00:00 2001 From: taizan-hokouto <55448286+taizan-hokuto@users.noreply.github.com> Date: Fri, 6 Nov 2020 19:56:54 +0900 Subject: [PATCH] Fix emoji encoding --- pytchat/processors/html_archiver.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytchat/processors/html_archiver.py b/pytchat/processors/html_archiver.py index f969a3a..c37cfca 100644 --- a/pytchat/processors/html_archiver.py +++ b/pytchat/processors/html_archiver.py @@ -132,7 +132,7 @@ class HTMLArchiver(ChatProcessor): return standard_b64encode(resp.content).decode() def _set_emoji_table(self, item: dict): - emoji_id = item['id'] + emoji_id = ''.join(('Z', item['id'])) if 48 <= ord(item['id'][0]) <= 57 else item['id'] if emoji_id not in self.emoji_table: self.emoji_table.setdefault(emoji_id, self.executor.submit(self._encode_img, item['url'])) return emoji_id