import{t as e}from"./got-BBDj7u1e.mjs";import{n as t,t as n}from"./util-DDCebyGe.mjs";import{load as r}from"cheerio";const i={path:`/blog/:id`,categories:[`finance`],example:`/taoguba/blog/252069`,parameters:{id:`博客 id，可在对应博客页中找到`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`tgb.cn/blog/:id`,`tgb.cn/`]}],name:`用户博客`,maintainers:[`nczitzk`],handler:a};async function a(i){let a=`${t}/blog/${i.req.param(`id`)}`,o=r((await e({method:`get`,url:a})).data),s=o(`meta[property="og:author"]`).attr(`content`),c=o(`.tittle_data`).slice(0,i.req.query(`limit`)?Number.parseInt(i.req.query(`limit`)):50).toArray().map(e=>{e=o(e);let n=e.find(`a`).first();return{title:n.text().trim(),link:`${t}/${n.attr(`href`)}`,author:s}});return c=await Promise.all(c.map(async e=>await n(e))),{title:`淘股吧 - ${s}`,description:o(`meta[http-equiv="description"]`).attr(`content`),image:o(`meta[property="og:image"]`).attr(`content`),link:a,item:c}}export{i as route};