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"./utils-DwzuUs2Z.mjs";const i={path:`/keyword/:keyword`,categories:[`finance`],view:0,example:`/gelonghui/keyword/早报`,parameters:{keyword:`搜索关键字`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`搜索关键字`,maintainers:[`nczitzk`],handler:a};async function a(i){let a=i.req.param(`keyword`),o=`https://www.gelonghui.com/api/post/search/v4`,{data:s}=await n(o,{searchParams:{keyword:a,isVipArticle:!1,count:i.req.query(`limit`)?Number(i.req.query(`limit`)):20,page:1,searchArea:`all`}}),c=s.result.map(e=>({title:e.title,description:e.summary,link:e.link,author:e.source,pubDate:t(e.timestamp,`X`)})),l=await Promise.all(c.map(t=>r(t,e.tryGet)));return{title:`格隆汇 - 关键词 “${a}” 的文章`,link:o,item:l,description:`找到关于 “ ${a} ”的文章，共${s.totalCount}个结果`}}export{i as route};