import{t as e}from"./cache-DUthuMSu.mjs";import{n as t,r as n,t as r}from"./util-DbEVaJYR.mjs";const i={path:`/search/:keyword/:mode?`,example:`/nhentai/search/language%3Ajapanese+-scat+-yaoi+-guro+-"mosaic+censorship"`,parameters:{keyword:"Keywords for search. You can copy the content after `q=` after searching on the original website, or you can enter it directly. See the [official website](https://nhentai.net/info/) for details",mode:"mode, `simple` to only show cover, `detail` to show all pages, `torrent` to include Magnet URI, need login, refer to [Route-specific Configurations](https://docs.rsshub.app/deploy/config#route-specific-configurations), default to `simple`"},features:{requirePuppeteer:!1,antiCrawler:!0,supportBT:!0,nsfw:!0},radar:[{source:[`nhentai.net/:key/:keyword`],target:`/:key/:keyword`}],name:`Advanced Search`,maintainers:[`MegrezZhu`,`hoilc`,`pseudoyu`],handler:a};async function a(i){let{keyword:a,mode:o}=i.req.param(),s=`https://nhentai.net/search/?q=${a}`,c=await t(s),l=i.req.query(`limit`)?Number.parseInt(i.req.query(`limit`)):5,u=c;return o===`detail`?u=await r(e,c,l):o===`torrent`&&(u=await n(e,c,l)),{title:`nhentai - search - ${a}`,link:s,item:u}}export{i as route};