抖音解析只支持文本,引用和其他类型的不支持解析

This commit is contained in:
liuwei
2026-01-28 09:34:13 +08:00
parent 0d81889029
commit 6b3b43ffc3

View File

@@ -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