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://jwc.shmtu.edu.cn`;async function o(e){return i((await n(e)).data)(`.wp_articlecontent`).html()}const s=(e,t)=>Promise.all(e.map(e=>t.tryGet(e.link,async()=>(e.description=await o(e.link),e)))),c={path:`/jwc/:type`,categories:[`university`],example:`/shmtu/jwc/jwgg`,parameters:{type:`类型名称`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`jwc.shmtu.edu.cn/:type`]}],name:`教务信息`,maintainers:[`imbytecat`,`simonsmh`],handler:l,description:`| 教务公告 | 教务新闻 |
| -------- | -------- |
| jwgg     | jwxw     |`};async function l(o){let c=o.req.param(`type`),l=c===`jwgg`?`教务公告`:`教务新闻`,u=i((await n(`${a}/${c}/list.htm`,{headers:{Referer:a}})).data),d=await s(u(`tbody tr`).toArray().map(e=>(e=u(e),{title:e.find(`.views-field-nothing a`).attr(`title`).trim(),link:new URL(e.find(`a`).attr(`href`),a).href,pubDate:r(t(e.find(`.pubdate`).text()),8),category:e.find(`.views-field-field-xxlb`).text(),author:e.find(`.views-field-field-xxly`).text()})),e);return{title:`上海海事大学 ${l}`,link:`${a}/${c}`,description:`上海海事大学 教务信息`,item:d}}export{c as route};