{"record":{"id":"a2424fc636360bac","repo":"DIYgod/RSSHub","slug":"uid-bilibili-cookie-a2424f","errorCode":null,"errorMessage":"对应 uid 的 Bilibili 用户的 Cookie 已过期","messagePattern":"对应 uid 的 Bilibili 用户的 Cookie 已过期","errorType":"exception","errorClass":"ConfigNotFoundError","httpStatus":503,"severity":"error","filePath":"lib/routes/bilibili/manga-followings.ts","lineNumber":58,"sourceCode":"    const name = await cache.getUsernameFromUID(uid);\n\n    const cookie = config.bilibili.cookies[uid];\n    if (cookie === undefined) {\n        throw new ConfigNotFoundError('缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值');\n    }\n    const page_size = ctx.req.param('limits') || 10;\n    const link = 'https://manga.bilibili.com/account-center';\n    const response = await got({\n        method: 'POST',\n        url: 'https://manga.bilibili.com/twirp/bookshelf.v1.Bookshelf/ListFavorite?device=pc&platform=web',\n        json: { page_num: 1, page_size, order: 2, wait_free: 0 },\n        headers: {\n            Referer: link,\n            Cookie: cookie,\n        },\n    });\n    if (response.data.code === -6) {\n        throw new ConfigNotFoundError('对应 uid 的 Bilibili 用户的 Cookie 已过期');\n    }\n    const comics = response.data.data;\n\n    return {\n        title: `${name} 的追漫更新 - 哔哩哔哩漫画`,\n        link,\n        item: comics.map((item) => ({\n            title: `${item.title} ${item.latest_ep_short_title}`,\n            description: `<img src='${item.vcover}'>`,\n            pubDate: new Date(item.last_ep_publish_time + ' +0800'),\n            link: `https://manga.bilibili.com/detail/mc${item.comic_id}`,\n        })),\n    };\n}\n","sourceCodeStart":40,"sourceCodeEnd":73,"githubUrl":"https://github.com/DIYgod/RSSHub/blob/bed535e0879dc71c5aff6f1e7bd1ac21ede40115/lib/routes/bilibili/manga-followings.ts#L40-L73","documentation":"ConfigNotFoundError thrown by the manga-followings route when the manga bookshelf API returns code -6, indicating the cookie's session has expired. The POST to manga.bilibili.com/twirp/bookshelf.v1.Bookshelf/ListFavorite rejects the expired SESSDATA.","triggerScenarios":"The ListFavorite API returns code -6 for the configured cookie. The manga sub-service shares the main Bilibili session, so SESSDATA expiry affects it identically.","commonSituations":"SESSDATA expired after prolonged use; account password changed; cookie copied without SESSDATA; Bilibili session rotation.","solutions":["Refresh BILIBILI_COOKIE_<uid> from a fresh browser login.","Restart RSSHub to load the new cookie.","Verify SESSDATA is present in the cookie string."],"exampleFix":"// before: expired manga cookie\nBILIBILI_COOKIE_123456=SESSDATA=old;...\n\n// after\nBILIBILI_COOKIE_123456=SESSDATA=fresh; bili_jct=xxx; DedeUserID=123456;","handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try {\n    const response = await got({...});\n    if (response.data.code === -6) {\n        throw new ConfigNotFoundError('Manga cookie expired');\n    }\n} catch (e) {\n    throw e;\n}","preventionTips":["Refresh cookies proactively on a schedule.","Monitor for -6 codes in manga routes.","Test the manga bookshelf API manually after cookie updates."],"tags":["bilibili","manga","cookie","session-expiry","authentication","rsshub"],"backgroundTag":null,"analyzedSha":"bed535e0879dc71c5aff6f1e7bd1ac21ede40115","analyzedAt":"2026-08-12T19:29:35.364Z","schemaVersion":2},"datasetVersion":"2026-08-12T23:17:12.415Z"}