Skip to content

Commit

Permalink
update bilibili.py
Browse files Browse the repository at this point in the history
  • Loading branch information
fllesser committed Jan 14, 2025
1 parent c8f8747 commit e40ecc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions nonebot_plugin_resolver2/matchers/bilibili.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,8 +249,8 @@ def accumulate_text(node):
# 这里是总结内容,如果写了 cookie 就可以
if credential:
ai_conclusion = await v.get_ai_conclusion(await v.get_cid(0))
if ai_summary := ai_conclusion.get("model_result", {"summary": ""}).get("summary", "该视频暂不支持AI总结"):
segs.append(f"AI总结: {ai_summary}")
ai_summary = ai_conclusion.get("model_result", {"summary": ""}).get("summary", "该视频暂不支持AI总结")
segs.append(f"AI总结: {ai_summary}")
if video_duration > DURATION_MAXIMUM:
segs.append(f"⚠️ 当前视频时长 {video_duration // 60} 分钟,超过管理员设置的最长时间 {DURATION_MAXIMUM // 60} 分钟!")
await bilibili.send(construct_nodes(bot.self_id, segs))
Expand Down

0 comments on commit e40ecc8

Please sign in to comment.