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{t as r}from"./timezone-keeL11Io.mjs";import{load as i}from"cheerio";const a={path:`/index/tzgg`,categories:[`university`],example:`/xyu/index/tzgg`,features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`www.xyc.edu.cn/index/tzgg.htm`]}],name:`官网通知公告`,maintainers:[`JinMokai`],handler:o,url:`www.xyc.edu.cn/index/tzgg.htm`};async function o(){let a=`https://www.xyc.edu.cn`,o=`${a}/index/tzgg.htm`,s=await e(o);if(!s)return{title:`新余学院 - 通知公告`,link:o,item:[]};let c=i(s),l=c(`.text-list ul li`).toArray().map(e=>{let t=c(e),i=t.find(`a`).attr(`href`);if(!i)return null;let o=t.find(`.list-tx h3`).text().trim(),s=t.find(`.list-tx p`).text().trim(),l=t.find(`.date p`).text().trim(),u=`${t.find(`.date span`).text().trim()}-${l.padStart(2,`0`)}`;return{title:o,link:new URL(i,a).href,description:s||o,pubDate:r(n(u,`YYYY-MM-DD`),8)}}).filter(Boolean);return{title:`新余学院 - 通知公告`,link:o,item:await Promise.all(l.map(n=>t.tryGet(n?.link||``,async()=>{if(!n)return``;try{let t=await e(n?.link);if(!t)return{...n,description:`该通知无法直接预览，请点击原文链接查看`};let r=i(t)(`.v_news_content, .content, .article-content`).html();if(r){let e=i(r);e(`a`).each(function(){let e=c(this),t=e.attr(`href`);t&&!t.startsWith(`http`)&&e.attr(`href`,new URL(t,a).href)}),n.description=e.html()}return n}catch{return{...n,description:`该通知无法直接预览，请点击原文链接查看`}}})))}}export{a as route};