import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{i as n}from"./common-utils-B6fqqa3X.mjs";import{t as r}from"./got-BBDj7u1e.mjs";import{t as i}from"./timezone-keeL11Io.mjs";import{load as a}from"cheerio";const o={path:`/yjs/*`,name:`Unknown`,maintainers:[],handler:s};async function s(o){let s=`https://yjs.nuist.edu.cn/${n(o)===`/yjs/`?`index/tzgg`:n(o).replace(/^\/yjs\//,``)}.htm`,c=a((await r({method:`get`,url:s})).data),l=c(`.gridlinediv`).toArray().map(e=>{e=c(e);let n=e.find(`a`).last();return{title:n.text(),link:new URL(n.attr(`href`),s).href,pubDate:t(e.next().text(),`YYYY年MM月DD日`)}});return l=await Promise.all(l.map(n=>e.tryGet(n.link,async()=>{let e=a((await r({method:`get`,url:n.link})).data),o=e(`.bar`).text().match(/(\d{4}年\d{2}月\d{2}日 \d{2}:\d{2})/);return n.description=e(`.v_news_content`).html(),n.pubDate=o?i(t(o[1],`YYYY年MM月DD日 HH:mm`),8):n.pubDate,n}))),{title:c(`title`).text(),link:s,item:l}}export{o as route};