调整异常扣分记录,如果是异常的数据,则不扣分

This commit is contained in:
liuwei
2025-04-17 14:42:47 +08:00
parent 05eb182e6a
commit 9579d3208f
10 changed files with 53 additions and 28 deletions

View File

@@ -122,7 +122,7 @@ class DouyinParserPlugin(MessagePluginInterface):
video_info = self._parse_douyin(original_url)
if not video_info:
print(f"❌无法解析抖音视频信息")
return True, "解析失败"
return False, "解析失败"
video_url = video_info.get('video', '')
title = video_info.get('title', '无标题')
@@ -131,7 +131,7 @@ class DouyinParserPlugin(MessagePluginInterface):
if not video_url:
print(f"❌无法获取视频地址")
return True, "获取视频地址失败"
return False, "获取视频地址失败"
# 根据模式选择发送方式
if self.download_mode == "file":
@@ -142,7 +142,7 @@ class DouyinParserPlugin(MessagePluginInterface):
return True, "发送视频文件成功"
else:
print(f"❌下载视频失败")
return True, "下载视频失败"
return False, "下载视频失败"
else:
# 发送卡片
wcf.send_rich_text(
@@ -159,11 +159,11 @@ class DouyinParserPlugin(MessagePluginInterface):
except DouyinParserError as e:
self.LOG.error(f"抖音解析错误: {e}")
print(f"❌抖音解析失败: {str(e)}")
return True, f"解析错误: {e}"
return False, f"解析错误: {e}"
except Exception as e:
self.LOG.error(f"处理抖音链接出错: {e}\n{traceback.format_exc()}")
print(f"❌处理抖音链接出错: {str(e)}")
return True, f"处理出错: {e}"
return False, f"处理出错: {e}"
def _clean_url(self, url: str) -> str:
"""清理URL"""