Archived
1
0
Fork 0

Minor fix

This commit is contained in:
多羅狼 2023-07-05 00:30:26 +08:00 committed by GitHub
parent 6aa157d5ee
commit f1447ad2f2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -8,7 +8,7 @@ from core.utils.http import get_url
async def get_info(msg: Bot.MessageSession, url, get_detail):
res = await get_url(url, 200, fmt='json')
if res['code'] != 0:
if res['code'] in [404, 62002]:
if res['code'] in [-404, -62002]:
await msg.finish(msg.locale.t("bilibili.message.not_found"))
elif res['code'] == -400:
await msg.finish(msg.locale.t('bilibili.message.error.invalid'))