Skip to content

Commit

Permalink
fix(route): bilibili 路由增加 4100000 提示 (#15564)
Browse files Browse the repository at this point in the history
* fix(route): bilibili 路由增加 4100000 提示

* fix(route): 修复部分问题
  • Loading branch information
CaoMeiYouRen authored May 12, 2024
1 parent 05fe332 commit 9779ac0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/routes/bilibili/followings-dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 值');
Expand All @@ -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) || '' : '');
Expand Down

0 comments on commit 9779ac0

Please sign in to comment.