import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{t as r}from"./timezone-keeL11Io.mjs";import{n as i,r as a,t as o}from"./utils-C2xQ7hwm.mjs";import{load as s}from"cheerio";const c={path:`/zhuanti/:id`,categories:[`reading`],example:`/aisixiang/zhuanti/211`,parameters:{id:`专题 ID, 可在对应专题 URL 中找到`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`专题`,maintainers:[`nczitzk`],handler:l,description:`::: tip
  更多专题请见 [关键词](http://www.aisixiang.com/zhuanti/)
:::`};async function l(c){let l=c.req.param(`id`),u=c.req.query(`limit`)?Number.parseInt(c.req.query(`limit`),10):30,d=new URL(`zhuanti/${l}.html`,a).href,{data:f}=await n(d),p=s(f),m=p(`div.tips h2`).first().text(),h=p(`div.article-title`).slice(0,u).toArray().map(e=>{e=p(e);let n=e.find(`a`);return{title:n.text(),link:new URL(n.prop(`href`),a).href,author:n.text().split(`：`)[0],pubDate:r(t(e.find(`span`).text()),8)}});return{item:await o(u,e.tryGet,h),title:`爱思想 - ${m}`,link:d,description:p(`div.tips p`).text(),language:`zh-cn`,image:new URL(`images/logo_zhuanti.jpg`,i).href,subtitle:m}}export{c as route};