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";var a={wh:{news:{name:`山东大学（威海）新闻网`,route:`/news`,source:[`/*path`,`/`],titlePrefix:`(威海)新闻网|`,docs:`https://docs.rsshub.app/routes/university#shan-dong-da-xue-wei-hai`,getTarget(e){return this.route+`/`+e.replace(/\.htm$/,``)},url:`https://xinwen.wh.sdu.edu.cn/`,columns:{xyyw:{name:`校园要闻`,url:`xyyw.htm`},xsdt:{name:`学生动态`,url:`xsdt.htm`},zhxw:{name:`综合新闻`,url:`zhxw.htm`},sdsd:{name:`山大视点`,url:`sdsd.htm`},jjxy:{name:`菁菁校园`,url:`jjxy.htm`},xyjx:{name:`校园简讯`,url:`xyjx.htm`},mjzc:{name:`玛珈之窗`,url:`mjzc.htm`},rdzt:{name:`热点专题`,url:`rdzt.htm`},mtsj:{name:`媒体视角`,url:`mtsj.htm`},gjsy:{name:`高教视野`,url:`gjsy.htm`},llxx:{name:`理论学习`,url:`llxx.htm`}}},jwc:{name:`山东大学（威海）教务处`,route:`/jwc`,source:[`/*path`,`/`],titlePrefix:`(威海)教务处|`,docs:`https://docs.rsshub.app/routes/university#shan-dong-da-xue-wei-hai`,getTarget(e){return this.route+`/`+e.replace(/\.htm$/,``)},url:`https://jwc.wh.sdu.edu.cn/`,columns:{gzzd:{name:`规章制度`,url:`gzzd.htm`},zyjs:{name:`专业建设`,url:`zyjs.htm`},sjjx:{name:`实践教学`,url:`sjjx.htm`},zbfc:{name:`支部风采`,url:`zbfc.htm`},fwzn:{name:`服务指南`,url:`fwzn.htm`},jwyw:{name:`教务要闻`,url:`jwyw.htm`},gztz:{name:`工作通知`,url:`gztz.htm`},jwjb:{name:`教务简报`,url:`jwjb.htm`},cyxz:{name:`常用下载`,url:`cyxz.htm`}}}}};const o=a=>e.tryGet(a,async()=>{let e,o,s;try{let c=i((await n(a)).data);e=c(`#vsb_content`).html(),o=c(`form[name='_newscontent_fromname'] > h1`).text();let l=c(`form[name='_newscontent_fromname'] > p.info`).text().trim().match(/^发布时间：(?<date>\d+\/\d+\/\d+\s\d{2}:\d{2}:\d{2})/).groups.date;return s=r(t(l,`YYYY/MM/DD HH:mm:ss`),8),{description:e,author:o,exactDate:s}}catch{return{description:e,author:o,exactDate:s}}}),s=a=>e.tryGet(a,async()=>{let e,o,s;try{let c=i((await n(a)).data);e=c(`#vsb_content`).html(),o=c(`form[name='_newscontent_fromname'] > div > p:last-of-type`).text();let l=c(`.news_tit > p:last-child`).text().match(/^发布日期：(?<date>\d+年\d+月\d+日\s\d{2}:\d{2})/).groups.date;return s=r(t(l,`YYYY年MM月DD日 HH:mm`),8),{description:e,author:o,exactDate:s}}catch{return{description:e,author:o,exactDate:s}}}),c=a=>e.tryGet(a,async()=>{let e,o;try{let s=i((await n(a)).data)(`form[name='_newscontent_fromname']`);s.find(`h2`).remove();let c=s.find(`#author`),l=c.text();c.remove(),e=s.html();let u=l.match(/^创建时间：(?<date>\d{4}-\d{2}-\d{2}\s\d{2}:\d{2}:\d{2})/).groups.date;return o=r(t(u,`YYYY-MM-DD HH:mm:ss`),8),{description:e,exactDate:o}}catch{return{description:e,exactDate:o}}}),l=a=>e.tryGet(a,async()=>{let e,o,s;try{let c=i((await n(a)).data);e=c(`#main-content`).html(),o=c(`#source`).text();let l=c(`.news_tit > p:last-child`).text().match(/^发布日期：(?<date>\d+年\d+月\d+日\s\d{2}:\d{2})/).groups.date;return s=r(t(l,`YYYY年MM月DD日 HH:mm`),8),{description:e,author:o,exactDate:s}}catch{return{description:e,author:o,exactDate:s}}}),u=e=>e.startsWith(`https://xinwen.wh.sdu.edu.cn/`)?l(e):e.startsWith(`https://www.view.sdu.edu.cn/`)?s(e):e.startsWith(`https://www.sdrj.sdu.edu.cn/`)?o(e):e.startsWith(`https://jwc.wh.sdu.edu.cn/`)?c(e):{};export{a as n,u as t};