UNPKG

rsshub

Version:
53 lines (51 loc) 1.46 kB
import "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs"; import { t as parseDate } from "./parse-date-BrP7mxXf.mjs"; import { load } from "cheerio"; //#region lib/routes/cupl/jwc.ts const route = { path: "/jwc", url: "jwc.cupl.edu.cn/index/tzgg.htm", categories: ["university"], example: "/cupl/jwc", description: "中国政法大学教务处通知公告", name: "教务处通知公告", features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["jwc.cupl.edu.cn/index/tzgg.htm", "jwc.cupl.edu.cn/"], target: "/jwc" }], maintainers: ["Fgju"], handler: async () => { const $ = load(await ofetch_default("https://jwc.cupl.edu.cn/index/tzgg.htm")); return { title: "通知公告", link: "https://jwc.cupl.edu.cn/index/tzgg.htm", description: "中国政法大学教务处通知公告", language: "zh-CN", item: $("li[id^=line_u8_]").toArray().map((elem) => { const elem_ = $(elem); const a = elem_.find("a"); return { link: a[1].attribs.href, title: $(a[1]).text(), pubDate: parseDate(elem_.find("span").text(), "YYYY-MM-DD"), category: $(a[0]).text().slice(0, -1), description: "" }; }) }; } }; //#endregion export { route };