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=`https://www.chinanews.com.cn`,o={path:`/`,radar:[{source:[`chinanews.com.cn/`],target:``}],name:`Unknown`,maintainers:[`yuxinliu-alex`],handler:s,url:`chinanews.com.cn/`};async function s(o){let s=`${a}/scroll-news/news1.html`,c=i((await n({method:`get`,url:s})).data),l=c(`a`,`.dd_bt`).toArray().map(e=>({link:a+c(e).attr(`href`),title:c(e).text()})).slice(0,o.req.query(`limit`)?Math.min(Number.parseInt(o.req.query(`limit`)),125):50);return{title:`中国新闻网`,link:s,description:`中国新闻网（简称“中新网”），由中国新闻社主办，为中央重点新闻网站。`,language:`zh-cn`,item:await Promise.all(l.map(a=>e.tryGet(a.link,async()=>{let e=i((await n({method:`get`,url:a.link})).data);if(e(`.adInContent`).remove(),e(`div.content_desc`).length>0){a.description=e(`div.content_desc`).html(),a.author=e(`a.source`).text();let n=e(`p`,`.left`).text().trim().slice(5).split(` `);a.author=n[2].trim(),a.pubDate=r(t(n[0]+n[1],`YYYY年MM月DD日HH:mm`),8)}else if(e(`div.t3`).length>0){a.description=e(`div.t3`).html();let n=e(`div[style="text-align:right;font-size:12px;"]`).text().slice(5).split(` `);a.author=n[2],a.pubDate=r(t(n[0]+n[1],`YYYY-MM-DDHH:mm`),8)}else{a.description=e(`div.left_zw`).html();let n=e(`div.left-t`).contents().filter(function(){return this.type===`text`}).text().split(`　`);a.pubDate=r(t(n[0],`YYYY年MM月DD日 HH:mm`),8),a.author=n[1]+e(`a.source`).text()}return a})))}}export{o as route};