From 538da538a3581a2fa9a12afe3efabeb509e9ba84 Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Wed, 3 Jul 2024 13:04:55 +0800 Subject: [PATCH] =?UTF-8?q?add=20(=E5=88=86=E4=BA=AB)=E5=8D=A1=E7=89=87?= =?UTF-8?q?=E5=BC=8F=E9=93=BE=E6=8E=A5=20=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pywxdump/dbpreprocess/parsingMSG.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pywxdump/dbpreprocess/parsingMSG.py b/pywxdump/dbpreprocess/parsingMSG.py index 0ccf456..c3fc02d 100644 --- a/pywxdump/dbpreprocess/parsingMSG.py +++ b/pywxdump/dbpreprocess/parsingMSG.py @@ -341,7 +341,8 @@ class ParsingMSG(DatabaseBase): """ 获取单条消息详情,格式化输出 """ - localId, IsSender, StrContent, StrTalker, Sequence, Type, SubType, CreateTime, MsgSvrID, DisplayContent, CompressContent, BytesExtra, id = row + (localId, IsSender, StrContent, StrTalker, Sequence, Type, SubType, CreateTime, MsgSvrID, + DisplayContent, CompressContent, BytesExtra, id) = row CreateTime = timestamp2str(CreateTime) type_id = (Type, SubType) @@ -416,6 +417,16 @@ class ParsingMSG(DatabaseBase): file_name = os.path.basename(url) content["msg"] = file_name + elif type_id == (49, 5): # (分享)卡片式链接 + CompressContent = self.decompress_CompressContent(CompressContent) + CompressContent_tmp = xml2dict(CompressContent) + appmsg = CompressContent_tmp.get("appmsg", {}) + title = appmsg.get("title", "") + des = appmsg.get("des", "") + url = appmsg.get("url", "") + content["msg"] = f"{title}\n{des}\n\n{url}" + content["src"] = url + elif type_id == (49, 19): # 合并转发的聊天记录 CompressContent = self.decompress_CompressContent(CompressContent) content_tmp = xml2dict(CompressContent)