import{t as e}from"./got-BBDj7u1e.mjs";import{load as t}from"cheerio";const n={path:`/explore/column/:id`,name:`Unknown`,maintainers:[],handler:r};async function r(n){let r=n.req.param(`id`),i=new URL(r,`https://www.douban.com/explore/column/`).href,a=t((await e.get(i)).data),o=a(`div.h1`).text(),s=a(`div.item`).slice(0,10).toArray().map(e=>({title:a(e).find(`div.title a`).text(),link:a(e).find(`div.title a`).attr(`href`),author:a(e).find(`div.usr-pic a`).text()}));for(let e=s.length-1;e>=0;e--)s[e].author===`[已注销]`&&s.splice(e,1);let c=await Promise.all(s.map(async n=>{let r=n.title,i=n.author,a=n.link;return{title:r,link:a,description:t((await e.get(a)).data)(`#link-report`).html(),author:i}}));return{title:`${o}-豆瓣发现`,link:i,item:c}}export{n as route};