import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{n as r,t as i}from"./utils-DKPCOPa3.mjs";import{load as a}from"cheerio";const o={path:`/tab/:tab?`,categories:[`picture`],example:`/jpxgmn/tab`,parameters:{tab:"分类，默认为`top`，包括`top`、`new`、`hot`，以及[源网站](http://www.jpxgmn.com/)所包含的其他相对路径，比如`Xiuren`、`XiaoYu`等"},radar:[{source:[`mei5.vip/:tab`],target:`/:tab`}],name:`分类`,maintainers:[`Urabartin`],handler:s,features:{nsfw:!0}};async function s(o){let{tab:s=`top`}=o.req.param(),c=[`new`,`top`,`hot`].includes(s),l=`${await r()}/${s}`+(c?`.html`:`/`),u=await e.raw(l),d=new URL(u.url).origin,f=a(u._data),p=f(`div.toptip > a`).get(1),m=f(`title`).text();c?m=m.split(`_`)[1]:p&&(m=f(p).text());let h=f(`div.related_posts ul > li`).toArray().map(e=>({title:f(e).find(`a span`).text(),link:new URL(f(e).find(`a`).attr(`href`),d).href,pubDate:n(f(e).find(`footer span`).first().text())}));return{title:`极品性感美女 - ${m}`,link:u.url,item:await Promise.all(h.map(e=>t.tryGet(e.link,async()=>(e.description=await i(e.link),e))))}}export{o as route};