import{t as e}from"./ofetch-Dl6dVB_5.mjs";import{t}from"./cache-DUthuMSu.mjs";import{t as n}from"./parse-date-BdYTmLpo.mjs";import{t as r}from"./timezone-keeL11Io.mjs";import{load as i}from"cheerio";const a=`https://lib.njxzc.edu.cn/pxyhd/list.htm`,o=`https://lib.njxzc.edu.cn`,s={path:`/libtzgg`,categories:[`university`],example:`/njxzc/libtzgg`,parameters:{},features:{requireConfig:!1,requirePuppeteer:!1,antiCrawler:!0,supportBT:!1,supportPodcast:!1,supportScihub:!1},radar:[{source:[`lib.njxzc.edu.cn/pxyhd/list.htm`,`lib.njxzc.edu.cn/`]}],name:`图书馆通知公告`,maintainers:[`real-jiakai`],handler:c,url:`lib.njxzc.edu.cn/pxyhd/list.htm`};async function c(){let s=await e(a);if(!s)return{title:`南京晓庄学院 -- 图书馆通知公告`,link:a,item:[]};let c=i(s),l=c(`a.btt-2`).toArray().map(e=>{let t=c(e),i=t.attr(`href`)||``,a=i.startsWith(`http`)?i:new URL(i,o).href,s=t.find(`.tm-1`).text().trim(),l=`${t.find(`.tm-2`).text().trim()}-${s}`;return{title:t.find(`.btt-4`).text().trim(),link:a,pubDate:r(n(l,`YYYY-MM-DD`),8)}});return{title:`南京晓庄学院 -- 图书馆通知公告`,link:a,item:await Promise.all(l.map(a=>t.tryGet(a.link,async()=>{let t=i(await e(a.link));if(t(`.wp_error_msg`).length>0)a.description=`您当前ip并非校内地址，该信息仅允许校内地址访问`;else{let e=t(`.wp_articlecontent`);e.find(`.wp_pdf_player`).each(function(){let e=t(this),n=e.attr(`pdfsrc`)||``,r=n.startsWith(`http`)?n:new URL(n,o).href;e.replaceWith(`<p><a href="${r}">附件下载</a></p>`)}),e.find(`a`).each(function(){let e=t(this),n=e.attr(`href`);n&&!n.startsWith(`http`)&&e.attr(`href`,new URL(n,o).href)}),a.description=e.html()||``;let i=t(`.arti_title`).text().trim();i&&(a.title=i);let s=t(`.arti_update`).text().replace(`发布时间：`,``).trim();s&&(a.pubDate=r(n(s,`YYYY-MM-DD`),8))}return a})))}}export{s as route};