import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{load as t}from"cheerio";const n={path:[`/rank/:status?`],radar:[{source:[`m.air-level.com/rank/:status`,`m.air-level.com/rank`],target:`/rank/:status`}],parameters:{status:`地区`},name:`空气质量排行`,maintainers:[`lifetraveler`],example:`/air-level/rank/best,/air-level/rank`,handler:r};async function r(n){let r=n.req.param(`status`),i=`https://m.air-level.com/rank`,a=t(await e(i)),o=``,s=``,c=a(`body > div.container > div.row.page > div:nth-child(1) > div:nth-child(5) > h3`).text().replaceAll(`[]`,``),l=a(`body > div.container > div.row.page > div:nth-child(1) > div:nth-child(5) > table`).html(),u=a(`body > div.container > div.row.page > div:nth-child(1) > div:nth-child(3) > h3`).text().replaceAll(`[]`,``),d=a(`body > div.container > div.row.page > div:nth-child(1) > div:nth-child(3) > table`).html();r?(r===`best`&&(s=c,o=`<table border="1 solid black">${l}</table>`),r===`worsest`&&(s=u,o=`<table border="1 solid black">${d}</table>`)):(s=a(`body > div.container > div.row.page > div:nth-child(1) > h2`).text().replaceAll(`[]`,``),o=`${c}<br/><table border="1 solid black">${l}</table><br/><table border="1 solid black">${u}<br/>${d}</table>`);let f=a(`body > div.container > div.row.page > div:nth-child(1) > h4`).text();return{title:s,item:[{title:s,link:i,description:o,guid:f}],description:`空气质量排行`,link:i}}export{n as route};