diff --git a/plugins/douyin_parser/config.toml b/plugins/douyin_parser/config.toml index 629ae7d..7102377 100644 --- a/plugins/douyin_parser/config.toml +++ b/plugins/douyin_parser/config.toml @@ -2,7 +2,7 @@ enable = true # 发送模式: card(发送卡片) 或 file(下载并发送文件) -download_mode = "file" +download_mode = "card" # Http代理设置(用于获取真实链接发送卡片,如果家里有ipv6,可以设置为空) # 格式: http://用户名:密码@代理地址:代理端口 diff --git a/plugins/douyin_parser/main.py b/plugins/douyin_parser/main.py index 9ea83eb..02ed424 100644 --- a/plugins/douyin_parser/main.py +++ b/plugins/douyin_parser/main.py @@ -13,7 +13,7 @@ from base.plugin_common.plugin_interface import PluginStatus 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 +from wechat_ipad.models.appmsg_xml import LINK_XML_NORMAL, VIDEO_XML_MESSAGE class DouyinParserError(Exception): @@ -162,8 +162,7 @@ class DouyinParserPlugin(MessagePluginInterface): return False, "下载视频失败" else: # 发送卡片 - xml_content = f"{LINK_XML_NORMAL}".format(title=title, - des=author, + xml_content = f"{VIDEO_XML_MESSAGE}".format(title=title, url=video_url, thumburl=cover ) diff --git a/wechat_ipad/models/appmsg_xml.py b/wechat_ipad/models/appmsg_xml.py index c36905a..ff17584 100644 --- a/wechat_ipad/models/appmsg_xml.py +++ b/wechat_ipad/models/appmsg_xml.py @@ -140,3 +140,47 @@ LINK_XML_NORMAL = """ """ + +VIDEO_XML_MESSAGE = """ + + {title} + 点击观看无水印视频 + + 5 + 0 + 0 + + + + + 0 + {url} + + + + + + + 0 + + + + + + + + + + {thumburl} + + + 0 + +wxid_qf7oo9svlxb212 +0 + + 1 + + + +"""