import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./invalid-parameter-DLv2wPKB.mjs";import{n,t as r}from"./util-Ci6p8478.mjs";import{load as i}from"cheerio";const a=async a=>{let{id:o}=a.req.param();if(!o)throw new t(`请填入合法的分类 id，参见广场 https://www.jisilu.cn/explore/`);let s=Number.parseInt(a.req.query(`limit`)??`30`,10),c=new URL(`/category/${o}`,n).href,l=i(await e(c)),u=l(`html`).prop(`lang`)??`zh`,d=await r(l,l(`div.aw-question-list`),s);l(`div.pagination`).remove();let f=l(`meta[name="keywords"]`).prop(`content`).split(/,/)[0],p=l(`div.aw-logo img`).prop(`src`);return{title:`${l(`title`).text()} - ${l(`li.active`).slice(1).toArray().map(e=>l(e).text()).join(`|`)}`,description:l(`meta[name="description"]`).prop(`content`),link:c,item:d,allowEmpty:!0,image:p,author:f,language:u,id:c}},o={path:`/category/:id`,name:`分类`,url:`www.jisilu.cn`,maintainers:[`nczitzk`],handler:a,example:`/jisilu/category/4`,parameters:{id:`分类 id，可在对应分类页 URL 中找到`},description:"::: tip\n若订阅 [债券/可转债](https://www.jisilu.cn/category/4)，网址为 `https://www.jisilu.cn/category/4`，请截取 `https://www.jisilu.cn/category/` 到末尾的部分 `4` 作为 `id` 参数填入，此时目标路由为 [`/jisilu/category/4`](https://rsshub.app/jisilu/category/4)。\n:::\n\n| 新股 | 债券/可转债 | 套利 | 其他 | 基金 | 股票 |\n| ---- | ----------- | ---- | ---- | ---- | ---- |\n| 3    | 4           | 5    | 6    | 7    | 8    |\n",categories:[`finance`],features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportRadar:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.jisilu.cn/category/:id`],target:`/category/:id`},{title:`新股`,source:[`www.jisilu.cn/category/3`],target:`/category/3`},{title:`债券/可转债`,source:[`www.jisilu.cn/category/4`],target:`/category/4`},{title:`套利`,source:[`www.jisilu.cn/category/5`],target:`/category/5`},{title:`其他`,source:[`www.jisilu.cn/category/6`],target:`/category/6`},{title:`基金`,source:[`www.jisilu.cn/category/7`],target:`/category/7`},{title:`股票`,source:[`www.jisilu.cn/category/8`],target:`/category/8`}],view:0};export{a as handler,o as route};