增加更多消息类型的说明
This commit is contained in:
parent
dc80c3085d
commit
e1fd78e7ba
@ -201,7 +201,7 @@ class ParsingMicroMsg(DatabaseBase):
|
||||
for row in result:
|
||||
# 获取用户名、昵称、备注和聊天记录数量
|
||||
username, LastReadedCreateTime, LastReadedSvrId = row
|
||||
LastReadedCreateTime = timestamp2str(LastReadedCreateTime / 1000) if LastReadedCreateTime else None
|
||||
LastReadedCreateTime = timestamp2str(LastReadedCreateTime) if LastReadedCreateTime else None
|
||||
users.append(
|
||||
{"wxid": username, "LastReadedCreateTime": LastReadedCreateTime, "LastReadedSvrId": LastReadedSvrId})
|
||||
return users
|
||||
|
@ -18,7 +18,7 @@ import lxml.etree as ET # 这个模块更健壮些,微信XML格式有时有
|
||||
from collections import defaultdict
|
||||
|
||||
|
||||
def type_converter(type_id_or_name: [str,tuple]):
|
||||
def type_converter(type_id_or_name: [str, tuple]):
|
||||
"""
|
||||
消息类型ID与名称转换
|
||||
名称(str)=>ID(tuple)
|
||||
@ -37,26 +37,46 @@ def type_converter(type_id_or_name: [str,tuple]):
|
||||
(48, 0): "位置",
|
||||
|
||||
(49, 0): "文件",
|
||||
(49, 1): "类似文字消息而不一样的消息",
|
||||
(49, 5): "卡片式链接",
|
||||
(49, 1): "粘贴的文本",
|
||||
(49, 3): "(分享)音乐",
|
||||
(49, 4): "(分享)卡片式链接",
|
||||
(49, 5): "(分享)卡片式链接",
|
||||
(49, 6): "文件",
|
||||
(49, 7): "游戏相关",
|
||||
(49, 8): "用户上传的GIF表情",
|
||||
(49, 15): "未知-49,15",
|
||||
(49, 17): "位置共享",
|
||||
(49, 19): "合并转发的聊天记录",
|
||||
(49, 33): "分享的小程序",
|
||||
(49, 36): "分享的小程序",
|
||||
(49, 40): "分享收藏夹",
|
||||
(49, 24): "(分享)笔记",
|
||||
(49, 33): "(分享)小程序",
|
||||
(49, 36): "(分享)小程序",
|
||||
(49, 40): "(分享)收藏夹",
|
||||
(49, 44): "(分享)小说(猜)",
|
||||
(49, 50): "(分享)视频号名片",
|
||||
(49, 51): "(分享)视频号视频",
|
||||
(49, 53): "接龙",
|
||||
(49, 57): "带有引用的文本消息",
|
||||
(49, 63): "视频号直播或直播回放等",
|
||||
(49, 57): "引用回复",
|
||||
(49, 63): "视频号直播或直播回放",
|
||||
(49, 74): "文件(猜)",
|
||||
(49, 87): "群公告",
|
||||
(49, 88): "视频号直播或直播回放等",
|
||||
(49, 2000): "转账消息",
|
||||
(49, 2003): "赠送红包封面",
|
||||
|
||||
(50, 0): "语音通话",
|
||||
(65, 0): "企业微信打招呼(猜)",
|
||||
(66, 0): "企业微信添加好友(猜)",
|
||||
|
||||
(10000, 0): "系统通知",
|
||||
(10000, 1): "消息撤回1",
|
||||
(10000, 4): "拍一拍",
|
||||
(10000, 8000): "系统通知"
|
||||
(10000, 5): "消息撤回5",
|
||||
(10000, 6): "消息撤回6",
|
||||
(10000, 33): "消息撤回33",
|
||||
(10000, 36): "消息撤回36",
|
||||
(10000, 57): "消息撤回57",
|
||||
(10000, 8000): "邀请加群",
|
||||
(11000, 0): "未知-11000,0"
|
||||
})
|
||||
|
||||
if isinstance(type_id_or_name, tuple):
|
||||
@ -99,7 +119,7 @@ def timestamp2str(timestamp):
|
||||
"""
|
||||
if isinstance(timestamp, str) and timestamp.isdigit():
|
||||
timestamp = int(timestamp)
|
||||
elif isinstance(timestamp, int):
|
||||
elif isinstance(timestamp, int) or isinstance(timestamp, float):
|
||||
pass
|
||||
else:
|
||||
return timestamp
|
||||
|
Loading…
Reference in New Issue
Block a user