From 6b3b43ffc3e75f08f422accf4d8c6401d89a7d01 Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 28 Jan 2026 09:34:13 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=96=E9=9F=B3=E8=A7=A3=E6=9E=90=E5=8F=AA?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E6=96=87=E6=9C=AC=EF=BC=8C=E5=BC=95=E7=94=A8?= =?UTF-8?q?=E5=92=8C=E5=85=B6=E4=BB=96=E7=B1=BB=E5=9E=8B=E7=9A=84=E4=B8=8D?= =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/douyin_parser/main.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/douyin_parser/main.py b/plugins/douyin_parser/main.py index 98be05c..49e12b4 100644 --- a/plugins/douyin_parser/main.py +++ b/plugins/douyin_parser/main.py @@ -17,6 +17,7 @@ from utils.decorator.plugin_decorators import plugin_stats_decorator from utils.robot_cmd.robot_command import Feature, PermissionStatus, GroupBotManager from wechat_ipad import WechatAPIClient from wechat_ipad.models.appmsg_xml import LINK_XML_NORMAL, VIDEO_XML_MESSAGE +from wechat_ipad.models.message import MessageType class DouyinParserError(Exception): @@ -108,7 +109,8 @@ class DouyinParserPlugin(MessagePluginInterface): """检查是否可以处理该消息""" if not self.enable: return False - + if message.get("type") != MessageType.TEXT: + return False content = str(message.get("content", "")).strip() match = self.url_pattern.search(content) return match is not None