From 36267a49748e532cfa4195ff3f29f875e4db4c7a Mon Sep 17 00:00:00 2001 From: liuwei Date: Wed, 13 Aug 2025 10:13:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=8A=96=E9=9F=B3=E5=A4=84?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/douyin_parser/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/douyin_parser/main.py b/plugins/douyin_parser/main.py index ed08e4e..2c099e5 100644 --- a/plugins/douyin_parser/main.py +++ b/plugins/douyin_parser/main.py @@ -135,7 +135,7 @@ class DouyinParserPlugin(MessagePluginInterface): # 解析抖音视频 video_info = self._parse_douyin(original_url) if not video_info: - print(f"❌无法解析抖音视频信息") + self.LOG.error(f"❌无法解析抖音视频信息") return False, "解析失败" video_url = video_info.get('url', '') @@ -144,7 +144,7 @@ class DouyinParserPlugin(MessagePluginInterface): cover = video_info.get('cover', '') if not video_url: - print(f"❌无法获取视频地址") + self.LOG.error(f"❌无法获取视频地址") return False, "获取视频地址失败" # 根据模式选择发送方式 @@ -158,7 +158,7 @@ class DouyinParserPlugin(MessagePluginInterface): await self.bot.send_video_message((roomid if roomid else sender), Path(mp4_path)) return True, "发送视频文件成功" else: - print(f"❌下载视频失败") + self.LOG.error(f"❌下载视频失败") return False, "下载视频失败" else: # 发送卡片 @@ -172,11 +172,11 @@ class DouyinParserPlugin(MessagePluginInterface): except DouyinParserError as e: self.LOG.error(f"抖音解析错误: {e}") - print(f"❌抖音解析失败: {str(e)}") + self.LOG.error(f"❌抖音解析失败: {str(e)}") return False, f"解析错误: {e}" except Exception as e: self.LOG.error(f"处理抖音链接出错: {e}\n{traceback.format_exc()}") - print(f"❌处理抖音链接出错: {str(e)}") + self.LOG.error(f"❌处理抖音链接出错: {str(e)}") return False, f"处理出错: {e}" def _clean_url(self, url: str) -> str: