import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./got-BBDj7u1e.mjs";import{n,r,t as i}from"./const-BPgN7Hfn.mjs";import{load as a}from"cheerio";const o={path:`/search/:keyword`,categories:[`picture`],example:`/everia/search/日向坂46`,parameters:{keyword:`Keyword`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1,nsfw:!0},name:`Search`,maintainers:[`KTachibanaM`,`AiraNadih`],handler:s};async function s(o){let s=o.req.param(`keyword`),c=`${n}?s=${s}`,l=a((await t(c)).body),u=l(`article.post`).toArray();return{title:`${i} - Search: ${s}`,link:c,item:await Promise.all(u.map(t=>{let n=l(t).find(`h2.entry-title a`).attr(`href`);return e.tryGet(n,()=>r(n))}))}}export{o as route};