fix: bilibili Cookie overdue (#5783)
This commit is contained in:
parent
b61c54ea9a
commit
022433975e
|
|
@ -9,7 +9,7 @@ module.exports = async (ctx) => {
|
|||
|
||||
const cookie = config.bilibili.cookies[uid];
|
||||
if (cookie === undefined) {
|
||||
throw Error('缺少对应uid的b站用户登录后的Cookie值');
|
||||
throw Error('缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值');
|
||||
}
|
||||
|
||||
const response = await got({
|
||||
|
|
@ -20,6 +20,9 @@ module.exports = async (ctx) => {
|
|||
Cookie: cookie,
|
||||
},
|
||||
});
|
||||
if (response.data.code === -6) {
|
||||
throw Error('对应 uid 的 Bilibili 用户的 Cookie 已过期');
|
||||
}
|
||||
const cards = response.data.data.cards;
|
||||
|
||||
const out = await Promise.all(
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ module.exports = async (ctx) => {
|
|||
|
||||
const cookie = config.bilibili.cookies[uid];
|
||||
if (cookie === undefined) {
|
||||
throw Error('缺少对应uid的b站用户登录后的Cookie值');
|
||||
throw Error('缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值');
|
||||
}
|
||||
|
||||
const response = await got({
|
||||
|
|
@ -21,6 +21,9 @@ module.exports = async (ctx) => {
|
|||
Cookie: cookie,
|
||||
},
|
||||
});
|
||||
if (response.data.code === -6) {
|
||||
throw Error('对应 uid 的 Bilibili 用户的 Cookie 已过期');
|
||||
}
|
||||
const cards = response.data.data.cards;
|
||||
|
||||
const out = await Promise.all(
|
||||
|
|
|
|||
Loading…
Reference in New Issue