fix🐛: 修正b站订阅

This commit is contained in:
HibiKier
2023-09-06 18:53:15 +08:00
parent fb26be821b
commit 1130569a20
8 changed files with 3372 additions and 3235 deletions
+11 -5
View File
@@ -70,6 +70,12 @@ __plugin_configs__ = {
"default_value": False,
"type": bool,
},
"DOWNLOAD_DYNAMIC_IMAGE": {
"value": True,
"help": "下载动态中的图片并发送在提醒消息中",
"default_value": True,
"type": bool,
},
}
add_sub = on_command("添加订阅", priority=5, block=True)
@@ -255,11 +261,11 @@ async def _():
if sub:
try:
logger.debug(f"Bilibili订阅开始检测:{sub.sub_id}")
rst = await get_sub_status(sub.sub_id, sub.sub_type)
await send_sub_msg(rst or "", sub, bot) # type: ignore
rst = await get_sub_status(sub.sub_id, sub.sub_id, sub.sub_type)
await send_sub_msg(rst, sub, bot) # type: ignore
if sub.sub_type == "live":
rst = await get_sub_status(sub.sub_id, "up")
await send_sub_msg(rst or "", sub, bot) # type: ignore
rst += "\n" + await get_sub_status(sub.uid, sub.sub_id, "up")
await send_sub_msg(rst, sub, bot) # type: ignore
except Exception as e:
logger.error(f"B站订阅推送发生错误 sub_id:{sub.sub_id}", e=e)
@@ -298,4 +304,4 @@ async def send_sub_msg(rst: str, sub: BilibiliSub, bot: Bot):
else:
await bot.send_private_msg(user_id=int(x), message=Message(rst))
except Exception as e:
logger.error(f"B站订阅推送发生错误 sub_id:{sub.sub_id}", e=e)
logger.error(f"B站订阅推送发生错误 sub_id: {sub.sub_id}", e=e)