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: