import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";const r={path:`/hot/:period?`,categories:[`finance`],example:`/wallstreetcn/hot`,parameters:{period:"时期，可选 `day` 即 当日 或 `week` 即 当周，默认为当日"},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`wallstreetcn.com/`]}],name:`最热文章`,maintainers:[`nczitzk`],handler:i,url:`wallstreetcn.com/`};async function i(r){let i=r.req.param(`period`)??`day`,a=`https://api-one-wscn.awtmt.com`,o=(await n({method:`get`,url:`${a}/apiv1/content/articles/hot?period=all`})).data.data[`${i}_items`].map(e=>({guid:e.id,link:e.uri,pubDate:t(e.display_time*1e3)}));return o=await Promise.all(o.map(t=>e.tryGet(t.link,async()=>{let e=(await n({method:`get`,url:`${a}/apiv1/content/articles/${t.guid}?extract=0`})).data.data;return t.title=e.title||e.content_text,t.author=e.source_name??e.author.display_name,t.description=e.content+(e.content_more??``),t.category=e.asset_tags?.map(e=>e.name)??[],e.audio_uri&&(t.enclosure_type=`audio/mpeg`,t.enclosure_url=e.audio_uri,t.itunes_item_image=e.image?.uri??``,t.itunes_duration=e.audio_info?.duration??``),t}))),{title:`华尔街见闻 - 最热文章`,link:`https://wallstreetcn.com`,item:o,itunes_author:`华尔街见闻`,image:`https://static.wscn.net/wscn/_static/favicon.png`}}export{r as route};