From bf8e00836c7831c828571a09779ce6ca14d0ff57 Mon Sep 17 00:00:00 2001 From: xaoyaoo Date: Tue, 12 Mar 2024 18:55:23 +0800 Subject: [PATCH] =?UTF-8?q?=E5=90=88=E5=B9=B6=E8=BD=AC=E5=8F=91=E7=9A=84?= =?UTF-8?q?=E8=81=8A=E5=A4=A9=E8=AE=B0=E5=BD=95=20#84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pywxdump/analyzer/export_chat.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pywxdump/analyzer/export_chat.py b/pywxdump/analyzer/export_chat.py index 229807c3..8ec0c038 100644 --- a/pywxdump/analyzer/export_chat.py +++ b/pywxdump/analyzer/export_chat.py @@ -234,7 +234,17 @@ def get_msg_list(MSG_db_path, selected_talker="", start_index=0, page_size=500): file_name = os.path.basename(url) content["msg"] = file_name - elif type_id == (19, 2000): # 转账消息 + elif type_id == (49, 19): # 合并转发的聊天记录 + CompressContent = decompress_CompressContent(CompressContent) + content_tmp = parse_xml_string(CompressContent) + title = content_tmp.get("appmsg", {}).get("title", "") + des = content_tmp.get("appmsg", {}).get("des", "") + recorditem = content_tmp.get("appmsg", {}).get("recorditem", "") + recorditem = parse_xml_string(recorditem) + content["msg"] = f"{title}\n{des}" + content["src"] = recorditem + + elif type_id == (49, 2000): # 转账消息 CompressContent = decompress_CompressContent(CompressContent) content_tmp = parse_xml_string(CompressContent) feedesc = content_tmp.get("appmsg", {}).get("wcpayinfo", {}).get("feedesc", "") @@ -296,6 +306,7 @@ def get_chat_count(MSG_db_path: [str, list], username: str = ""): chat_counts[username] = chat_count return chat_counts + def get_all_chat_count(MSG_db_path: [str, list]): """ 获取聊天记录总数量