rsshub
Version:
Make RSS Great Again!
34 lines (33 loc) • 914 B
JavaScript
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs";
import { t as processPages } from "./utils-D48q-Xcc.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 $ = load(await rofetch("https://www.ynu.edu.cn/ydkx.htm"));
return {
title: "云南大学云大快讯",
link: "https://www.ynu.edu.cn/ydkx.htm",
description: "云南大学云大快讯",
item: await processPages({
list: $(".list li").toArray().map((e) => ({
path: $("a", e).attr("href") ?? "",
title: $("a", e).attr("title") ?? "",
author: "云南大学"
})),
host,
department: "home"
})
};
}
//#endregion
export { route };