UNPKG

rsshub

Version:
36 lines (35 loc) 948 B
import { t as rofetch } from "./ofetch-U0CdpE2g.mjs"; import { t as processPages } from "./utils-BBRZY_i4.mjs"; import { load } from "cheerio"; //#region lib/routes/ynu/home/main.ts const route = { path: "/home", categories: ["university"], example: "/ynu/home", radar: [{ source: ["www.ynu.edu.cn/ydkx.htm"] }], name: "云大快讯", maintainers: ["hzcheney"], handler }; async function handler() { const host = "https://www.ynu.edu.cn/"; const response = await rofetch("https://www.ynu.edu.cn/ydkx.htm"); const $ = load(response); const list = $(".list li").toArray().map((e) => ({ path: $("a", e).attr("href") ?? "", title: $("a", e).attr("title") ?? "", author: "云南大学" })); return { title: "云南大学云大快讯", link: "https://www.ynu.edu.cn/ydkx.htm", description: "云南大学云大快讯", item: await processPages({ list, host, department: "home" }) }; } //#endregion export { route };