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{load as i}from"cheerio";const a={latest:`div.index_tabs_container.js-tabs-container > div:nth-child(1)`,application:`div.index_tabs_container.js-tabs-container > div:nth-child(2)`},o={latest:`最新`,application:`应用`},s={path:`/information/:channel?`,categories:[`new-media`],example:`/hellobtc/information/latest`,parameters:{channel:"类型，可填 `latest` 和 `application` 及最新和应用，默认为最新"},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`首页`,maintainers:[`Fatpandac`],handler:c};async function c(s){let c=s.req.param(`channel`)??`latest`,l=`https://www.hellobtc.com`,u=i((await n(l)).data),d=u(a[c]).find(`div.new_item`).toArray().map(e=>({title:u(e).find(`h2`).text(),link:u(e).find(`a`).attr(`href`)})),f=await Promise.all(d.map(a=>e.tryGet(a.link,async()=>{let e=i((await n(a.link)).data);return a.description=e(`#nr`).html(),a.pubDate=r(t(e(`span.date`).text(),`YYYY-MM-DD HH:mm:ss`),8),a})));return{title:`白话区块链 - 首页 ${o[c]}`,link:l,item:f}}export{s as route};