diff --git a/lib/routes/bilibili/followings-dynamic.ts b/lib/routes/bilibili/followings-dynamic.ts index 1e09fa539..364fdada9 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) || '' : '');