UNPKG

rsshub

Version:
35 lines (34 loc) 975 B
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/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 $ = load(await rofetch(link)); 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 };