import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./config-BYRrjYC5.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{t as r}from"./config-not-found-B9AOp828.mjs";import{load as i}from"cheerio";const a={403:`720P`,404:`1080P`,405:`BDMV`,4130:`4K`,5815:`AV1`},o=e=>{let t=[],n=[],r=[];for(let i in e)t.push(e[i]),n.push(`:--:`),r.push(i);return[t.join(` | `),n.join(` | `),r.join(` | `)].map(e=>`| ${e} |`).join(`
`)},s={path:`/bd/:type?`,name:`BD`,categories:[`anime`],maintainers:[`equt`],example:`/tsdm39/bd`,parameters:{type:`BD type, checkout the table below for details`},features:{requireConfig:[{name:`TSDM39_COOKIES`,optional:!1,description:"天使动漫论坛登陆后的 cookie 值，可在浏览器控制台通过 `document.cookie` 获取。"}],requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},handler:async a=>{let{type:o}=a.req.param(),s=t.tsdm39.cookie;if(!s)throw new r(`缺少 TSDM39 用户登录后的 Cookie 值 <a href="https://docs.rsshub.app/zh/deploy/config#route-specific-configurations">TSDM 相关路由</a>`);return{title:`天使动漫论坛 - BD`,link:`https://www.tsdm39.com/forum.php?mod=forumdisplay&fid=85`,language:`zh-Hans`,item:i(await e(`https://www.tsdm39.com/forum.php?mod=forumdisplay&fid=85${o?`&filter=typeid&typeid=${o}`:``}`,{headers:{Cookie:s}}))(`tbody.tsdm_normalthread`).toArray().map(e=>{let t=i(e),r=t(`a.xst`).text(),a=t(`span.xw1`).last().text(),o=t(`a.xst`).attr(`href`),s=t(`td.by em`).first().text().trim();return{title:r,description:`价格：${a}`,link:o,pubDate:n(s)}})}},description:[a].map(e=>o(e)).join(`

`)};export{s as route};