rsshub
Version:
Make RSS Great Again!
34 lines (33 loc) • 1.02 kB
JavaScript
import { t as rofetch } from "./ofetch-U0CdpE2g.mjs";
import { t as parseDate } from "./parse-date-3kcy2Eau.mjs";
import { t as timezone } from "./timezone-UiMFOuvL.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 response = await rofetch(baseUrl);
const $ = load(response);
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 };