import{t as e}from"./cache-DUthuMSu.mjs";import{t}from"./parse-date-BdYTmLpo.mjs";import{t as n}from"./got-BBDj7u1e.mjs";import{load as r}from"cheerio";const i=`https://jwc.xmut.edu.cn`,a={path:`/jwc/bkjw/:category?`,name:`Unknown`,maintainers:[],handler:o};async function o(a){let{category:o=`jwxt`}=a.req.param(),s=`${i}/index/tzgg/${o}.htm`,c=r((await n(s,{headers:{referer:i}})).data),l=c(`#result_list table tbody tr`).toArray().map(e=>{let n=c(`td`,e).eq(0),r=c(`td`,e).eq(1),a=c(`a`,n).attr(`href`),o;o=a.startsWith(`../../`)?new URL(a,i).href:a;let s=c(`a`,n).attr(`title`),l=t(r.text().trim());return{title:s,link:o,pubDate:l}}),u=await Promise.all(l.map(t=>e.tryGet(t.link,async()=>(t.description=r((await n(t.link,{headers:{referer:i}})).data)(`table #result #content form div #vsb_content_6`).html(),t))));return{title:c(`title`).text(),link:s,item:u}}export{a as route};