抖音解析只支持文本,引用和其他类型的不支持解析
This commit is contained in:
@@ -17,6 +17,7 @@ from utils.decorator.plugin_decorators import plugin_stats_decorator
|
|||||||
from utils.robot_cmd.robot_command import Feature, PermissionStatus, GroupBotManager
|
from utils.robot_cmd.robot_command import Feature, PermissionStatus, GroupBotManager
|
||||||
from wechat_ipad import WechatAPIClient
|
from wechat_ipad import WechatAPIClient
|
||||||
from wechat_ipad.models.appmsg_xml import LINK_XML_NORMAL, VIDEO_XML_MESSAGE
|
from wechat_ipad.models.appmsg_xml import LINK_XML_NORMAL, VIDEO_XML_MESSAGE
|
||||||
|
from wechat_ipad.models.message import MessageType
|
||||||
|
|
||||||
|
|
||||||
class DouyinParserError(Exception):
|
class DouyinParserError(Exception):
|
||||||
@@ -108,7 +109,8 @@ class DouyinParserPlugin(MessagePluginInterface):
|
|||||||
"""检查是否可以处理该消息"""
|
"""检查是否可以处理该消息"""
|
||||||
if not self.enable:
|
if not self.enable:
|
||||||
return False
|
return False
|
||||||
|
if message.get("type") != MessageType.TEXT:
|
||||||
|
return False
|
||||||
content = str(message.get("content", "")).strip()
|
content = str(message.get("content", "")).strip()
|
||||||
match = self.url_pattern.search(content)
|
match = self.url_pattern.search(content)
|
||||||
return match is not None
|
return match is not None
|
||||||
|
|||||||
Reference in New Issue
Block a user