import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{load as r}from"cheerio";const i={path:`/pen0`,categories:[`new-media`],example:`/agora0/pen0`,parameters:{},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`agorahub.github.io/pen0`]}],name:`共和報`,maintainers:[`TonyRL`],handler:a,url:`agorahub.github.io/pen0`};async function a(){let i=await n(`https://agorahub.github.io/pen0/`),a=r(i.data),o=a(`div article`).toArray().slice(0,-1).map(e=>{e=a(e);let n=e.find(`h5`).first().text();return{title:e.find(`h3`).text(),link:e.find(`h3 a`).attr(`href`),author:n.split(`|`)[0].trim(),pubDate:t(n.split(`|`)[1].trim())}}),s=await Promise.all(o.map(t=>e.tryGet(t.link,async()=>{let e=r((await n(t.link)).data);return e(`h1`).remove(),t.description=e(`article`).html(),t})));return{title:a(`head title`).text(),description:a(`head meta[name="description"]`).attr(`content`),link:i.url,image:a(`link[rel="apple-touch-icon"]`).attr(`href`),item:s}}export{i as route};