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/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 response = await rofetch(baseUrl);
const $ = load(response);
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 };