rsshub
Version:
Make RSS Great Again!
33 lines (32 loc) • 997 B
JavaScript
import { t as rofetch } from "./ofetch-W1aeTHCo.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/jgsu/jwc.ts
const route = {
path: "/jwc",
categories: ["university"],
example: "/jgsu/jwc",
name: "教务处通知",
maintainers: ["butten42"],
handler
};
const baseUrl = "https://jwc.jgsu.edu.cn/xxgk2/jwtz.htm";
async function handler() {
const $ = load(await rofetch(baseUrl));
return {
link: baseUrl,
title: "井冈山大学教务处",
item: $(".xn_c_sv_20_li").toArray().map((item) => {
const $item = $(item);
return {
link: new URL($item.find(".xn_c_sv_20_top a").attr("href"), baseUrl).href,
title: $item.find(".xn_c_sv_20_top a").text(),
description: $item.find(".xn_c_sv_20_text").text().trim(),
pubDate: timezone(parseDate($item.find(".time").text().replaceAll(/[[\]]/g, "")), 8)
};
})
};
}
//#endregion
export { route };