rsshub
Version:
Make RSS Great Again!
36 lines (35 loc) • 1 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/zjgsu/gsgg.ts
const route = {
path: "/gsgg",
categories: ["university"],
example: "/zjgsu/gsgg",
name: "教务处 - 公示公告",
maintainers: ["nicolaszf"],
handler,
url: "jww.zjgsu.edu.cn/1380/list.htm"
};
const host = "https://jww.zjgsu.edu.cn";
const link = `${host}/1380/list.htm`;
async function handler() {
const response = await rofetch(link);
const $ = load(response);
return {
title: "浙江工商大学教务处 - 公示公告",
link,
item: $("li.column-news-item").toArray().map((item) => {
const $item = $(item);
const a = $item.find("a");
return {
title: a.text(),
link: new URL(a.attr("href"), host).href,
pubDate: timezone(parseDate($item.find(".column-news-date").text()), 8)
};
})
};
}
//#endregion
export { route };