From 7c0be9bb28ead4bff036e28c383c068112e15927 Mon Sep 17 00:00:00 2001 From: STDquantum <405720329@qq.com> Date: Wed, 20 Dec 2023 23:45:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Demoji=E8=A7=A3=E6=9E=90?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/util/emoji.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/util/emoji.py b/app/util/emoji.py index bbe618e..4a6c5cb 100644 --- a/app/util/emoji.py +++ b/app/util/emoji.py @@ -166,6 +166,8 @@ def get_most_emoji(messages): for msg in messages: str_content = msg[7] emoji_info = parser_xml(str_content) + if emoji_info is None: + continue md5 = emoji_info['md5'] if not md5: continue @@ -231,8 +233,9 @@ if __name__ == '__main__': # print(res1, res1['md5']) # download(res1['cdnurl'], "./data/emoji/", res1['md5']) # download(res1['thumburl'], "./data/emoji/", res1['md5'], True) - print(Emotion().get_emoji_url("144714f65c98844128ac3a1042445d9a", True)) - print(Emotion().get_emoji_url("144714f65c98844128ac3a1042445d9a", False)) + # print(Emotion().get_emoji_url("144714f65c98844128ac3a1042445d9a", True)) + # print(Emotion().get_emoji_url("144714f65c98844128ac3a1042445d9a", False)) + print(parser_xml("")) # print(get_emoji(xml_string, True)) # print(get_emoji(xml_string, False)) # http://vweixinf.tc.qq.com/110/20403/stodownload?m=3a4d439aba02dce4834b2c54e9f15597&filekey=3043020101042f302d02016e0402534804203361346434333961626130326463653438333462326335346539663135353937020213f0040d00000004627466730000000131&hy=SH&storeid=323032313037323030373236313130303039653236646365316535316534383236386234306230303030303036653033303034666233&ef=3&bizid=1022