From 9779ac09c86ed3498b772eb9737795b71bda696f Mon Sep 17 00:00:00 2001 From: CaoMeiYouRen <40430746+CaoMeiYouRen@users.noreply.github.com> Date: Sun, 12 May 2024 17:06:07 +0800 Subject: [PATCH] =?UTF-8?q?fix(route):=20bilibili=20=E8=B7=AF=E7=94=B1?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=204100000=20=E6=8F=90=E7=A4=BA=20(#15564)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(route): bilibili 路由增加 4100000 提示 * fix(route): 修复部分问题 --- lib/routes/bilibili/followings-dynamic.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/routes/bilibili/followings-dynamic.ts b/lib/routes/bilibili/followings-dynamic.ts index 1e09fa53930c3c..364fdada9475f8 100644 --- a/lib/routes/bilibili/followings-dynamic.ts +++ b/lib/routes/bilibili/followings-dynamic.ts @@ -47,7 +47,6 @@ async function handler(ctx) { const displayArticle = fallback(undefined, queryToBoolean(routeParams.displayArticle), false); const name = await cache.getUsernameFromUID(uid); - const cookie = config.bilibili.cookies[uid]; if (cookie === undefined) { throw new ConfigNotFoundError('缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值'); @@ -64,6 +63,9 @@ async function handler(ctx) { if (response.data.code === -6) { throw new ConfigNotFoundError('对应 uid 的 Bilibili 用户的 Cookie 已过期'); } + if (response.data.code === 4_100_000) { + throw new ConfigNotFoundError('对应 uid 的 Bilibili 用户 请求失败'); + } const data = JSONbig.parse(response.body).data.cards; const getTitle = (data) => (data ? data.title || data.description || data.content || (data.vest && data.vest.content) || '' : '');