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={path:`/cse/:category?`,categories:[`university`],example:`/zju/cse/bksjy`,parameters:{category:"类别：`bksjy`，默认为简讯专栏，详情在描述中"},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!1,supportBT:!1,supportPodcast:!1,supportScihub:!1},name:`控制学院通知`,maintainers:[`Rabbits-sys`],handler:o,description:`栏目类型

| 简讯专栏 | 本科生教育 | 研究生教育 | 科研学术 | 人事工作 | 学生思政 | 对外交流 | 就业指导 |
| ------ | ------- | ------- | ------ | ------ | ------ | ------ | ------ |
|   -    |  bksjy  |  yjsjy  |  kyxs  |  rsgz  |  xssz  |  dwjl  |  jyzd  |`};async function o(a){let o=a.req.param(`category`)??``,s=`http://www.cse.zju.edu.cn/`,c={bksjy:{title:`本科生教育`,tag:`39322`},yjsjy:{title:`研究生教育`,tag:`39333`},kyxs:{title:`科研学术`,tag:`39312`},rsgz:{title:`人事工作`,tag:`39306`},xssz:{title:`学生思政`,tag:`39342`},dwjl:{title:`对外交流`,tag:`39353`},jyzd:{title:`就业指导`,tag:`39351`}},l=Object.keys(c).includes(o)?`${s}/${c[o].tag}/list.htm`:`${s}/39283/list.htm`,u=i((await n(l)).data),d=u(`div.con1rm2rt.xi20`).toArray().map(e=>{let t=u(e).find(`a`),n=t.text(),r=t.attr(`href`);return!r||/https?:\/\//i.test(r)?null:{title:n,link:new URL(r,s).href}}).filter(e=>e!==null),f=await Promise.all(d.map(a=>e.tryGet(a.link,async()=>{let e=i((await n(a.link)).data),o=e(`span.xi14`).text().match(/\b\d{4}-\d{2}-\d{2}\b/),s=r(t(o?o[0]:``),8),c=e(`div.wp_articlecontent`).html();return{title:a.title,pubDate:s,link:a.link,guid:a.link,description:c}})));return{title:`浙江大学控制学院通知 - ${c[o]?.title||`简讯专栏`}`,link:l,item:f}}export{a as route};