mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-24 02:08:55 +08:00
fix: bilibili Cookie overdue (#5783)
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user