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"./timezone-keeL11Io.mjs";import{load as i}from"cheerio";const a={path:`/analyst/rank/:type?`,categories:[`finance`],example:`/qianzhan/analyst/rank/week`,parameters:{type:`分类，见下表`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`qianzhan.com/analyst`,`qianzhan.com/`],target:`/analyst/rank`}],name:`排行榜`,maintainers:[`moke8`],handler:o,url:`qianzhan.com/analyst`,description:`| 周排行 | 月排行 |
| ------ | ------ |
| week   | month  |`};async function o(a){let o=a.req.param(`type`)===`week`?1:2,s=`https://www.qianzhan.com/analyst/`,c=i((await n(s)).data),l=c(`#div_hotlist ul[idx='${o}'] a`).map((e,t)=>c(t).attr(`href`)),u=await Promise.all(l.map((a,o)=>e.tryGet(o,async()=>{let e=i((await n(o)).data),a=e(`#divArtBody`).html();return{title:e(`#h_title`).text(),link:o,description:a,pubDate:r(t(e(`#pubtime_baidu`).text().split(`• `)[1],`YYYY-MM-DD HH:mm:ss`),8),author:e(`.bljjxue`).text().match(/\S+/)[0],category:e(`meta[name="Keywords"]`).attr(`content`).split(`,`)}})));return{title:`前瞻经济学人 - ${o===1?`周排行`:`月排行`}`,link:s,item:u}}export{a as route};