UNPKG

rsshub

Version:
29 lines (28 loc) 861 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/hfut/tzgg.ts const route = { path: "/tzgg", categories: ["university"], example: "/hfut/tzgg", name: "通知公告", maintainers: ["logerrors"], handler }; async function handler() { const baseUrl = "https://news.hfut.edu.cn/tzgg2.htm"; const $ = load(await rofetch(baseUrl)); return { link: baseUrl, title: $("title").text(), item: $("#tzz li").slice(0, 10).toArray().map((elem) => ({ title: $("a", elem).attr("title"), link: $("a", elem).attr("href"), pubDate: timezone(parseDate($("a > i", elem).text().replace("年", "-").replace("月", "-").replace("日", "")), 8) })) }; } //#endregion export { route };