import{t as e}from"./config-BYRrjYC5.mjs";import{t}from"./got-BBDj7u1e.mjs";import{t as n}from"./config-not-found-B9AOp828.mjs";import{t as r}from"./cache-DCQ3KkFK.mjs";const i={path:`/manga/followings/:uid/:limits?`,categories:[`social-media`],example:`/bilibili/manga/followings/26009`,parameters:{uid:`用户 id`,limits:`抓取最近更新前多少本漫画，默认为10`},features:{requireConfig:[{name:`BILIBILI_COOKIE_*`,description:"BILIBILI_COOKIE_{uid}: 用于用户关注动态系列路由，对应 uid 的 b 站用户登录后的 Cookie 值，`{uid}` 替换为 uid，如 `BILIBILI_COOKIE_2267573`，获取方式：\n    1.  打开 [https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=0&type=8](https://api.vc.bilibili.com/dynamic_svr/v1/dynamic_svr/dynamic_new?uid=0&type=8)\n    2.  打开控制台，切换到 Network 面板，刷新\n    3.  点击 dynamic_new 请求，找到 Cookie\n    4.  视频和专栏，UP 主粉丝及关注只要求 `SESSDATA` 字段，动态需复制整段 Cookie"}],requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`用户追漫更新`,maintainers:[`yindaheng98`],handler:a,description:`::: warning
  用户追漫需要 b 站登录后的 Cookie 值，所以只能自建，详情见部署页面的配置模块。
:::`};async function a(i){let a=String(i.req.param(`uid`)),o=await r.getUsernameFromUID(a),s=e.bilibili.cookies[a];if(s===void 0)throw new n(`缺少对应 uid 的 Bilibili 用户登录后的 Cookie 值`);let c=i.req.param(`limits`)||10,l=`https://manga.bilibili.com/account-center`,u=await t({method:`POST`,url:`https://manga.bilibili.com/twirp/bookshelf.v1.Bookshelf/ListFavorite?device=pc&platform=web`,json:{page_num:1,page_size:c,order:2,wait_free:0},headers:{Referer:l,Cookie:s}});if(u.data.code===-6)throw new n(`对应 uid 的 Bilibili 用户的 Cookie 已过期`);let d=u.data.data;return{title:`${o} 的追漫更新 - 哔哩哔哩漫画`,link:l,item:d.map(e=>({title:`${e.title} ${e.latest_ep_short_title}`,description:`<img src='${e.vcover}'>`,pubDate:new Date(e.last_ep_publish_time+` +0800`),link:`https://manga.bilibili.com/detail/mc${e.comic_id}`}))}}export{i as route};