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{t as i}from"./utils-DoRV6VMM.mjs";import{load as a}from"cheerio";const o={path:`/scs/:code`,categories:[`university`],example:`/swpu/scs/tzgg`,parameters:{code:`栏目代码`},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`swpu.edu.cn/`],target:``}],name:`计算机与软件学院`,maintainers:[`CYTMWIA`],handler:s,url:`swpu.edu.cn/`,description:`| 栏目 | 通知公告 | 新闻速递 |
| ---- | -------- | -------- |
| 代码 | tzgg     | xwsd     |`};async function s(o){let s=`https://www.swpu.edu.cn/scs/index/${o.req.param(`code`)}.htm`,c=a((await n.get(s)).data),l=c(`.r_list > h3`).text(),u=c(`.main_conRCb > ul > li`).toArray().map(e=>({title:c(`em`,e).text().trim(),pubDate:r(t(c(`span`,e).text()),8),link:i(`https://www.swpu.edu.cn/scs/index/`,c(`a`,e).attr(`href`))})),d=await Promise.all(u.map(async t=>await e.tryGet(t.link,async()=>{let e=a((await n.get(t.link)).data);if(e(`title`).text().startsWith(`系统提示`))t.author=`系统`,t.description=`无权访问`;else{t.author=`计算机与软件学院`,t.description=e(`.v_news_content`).html();for(let n of e(`.v_news_content p`))if(e(n).css(`text-align`)===`right`){t.author=e(n).text();break}}return t})));return{title:`西南石油大学计算机与软件学院 ${l}`,link:s,description:`西南石油大学计算机与软件学院 ${l}`,language:`zh-CN`,item:d}}export{o as route};