UNPKG

rsshub

Version:
33 lines (32 loc) 997 B
import { t as rofetch } from "./ofetch-eUBdfMpp.mjs"; import { t as parseDate } from "./parse-date-CjhZE69i.mjs"; import { t as timezone } from "./timezone-DE--ze1V.mjs"; import { load } from "cheerio"; //#region lib/routes/cug/xgxy.ts const route = { path: "/xgxy", categories: ["university"], example: "/cug/xgxy", features: { antiCrawler: true }, name: "地理与信息工程学院综合通知公告", maintainers: ["chunibyo-wly"], handler }; async function handler() { const baseUrl = "https://xgxy.cug.edu.cn/sybk/tzgg.htm"; const $ = load(await rofetch(baseUrl)); return { title: "中国地质大学(武汉)地理与信息工程学院 - 综合通知公告", link: baseUrl, item: $(".text-list ul li").toArray().map((item) => { const $item = $(item); return { title: $item.find("a").text(), link: new URL($item.find("a").attr("href"), baseUrl).href, pubDate: timezone(parseDate($item.find("span").text()), 8) }; }) }; } //#endregion export { route };