rsshub
Version:
Make RSS Great Again!
52 lines (50 loc) • 1.31 kB
JavaScript
import "./dist-Bog6z_OM.mjs";
import "./config-MQ-7ebJ_.mjs";
import "./logger-C4avouvV.mjs";
import "./ofetch-DKl_Ma9g.mjs";
import "./helpers-Bo4JQYdN.mjs";
import { t as got_default } from "./got-CO-ndVl2.mjs";
import { load } from "cheerio";
//#region lib/routes/qust/jw.ts
const baseUrl = "https://jw.qust.edu.cn/";
const route = {
path: "/jw",
categories: ["university"],
example: "/qust/jw",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["jw.qust.edu.cn/jwtz.htm", "jw.qust.edu.cn/"] }],
name: "教务通知",
maintainers: ["Silent-wqh"],
handler,
url: "jw.qust.edu.cn/jwtz.htm"
};
async function handler() {
const $ = load((await got_default({
method: "get",
url: `${baseUrl}jwtz.htm`
})).data);
const items = $(".winstyle60982 tr a.c60982").toArray().map((element) => {
const linkElement = $(element);
const itemTitle = linkElement.text().trim();
const path = linkElement.attr("href");
return {
title: itemTitle,
link: path.startsWith("http") ? path : `${baseUrl}${path}`
};
});
return {
title: "青岛科技大学 - 教务通知",
link: `${baseUrl}jwtz.htm`,
item: items
};
}
//#endregion
export { route };