rsshub
Version:
Make RSS Great Again!
27 lines (26 loc) • 937 B
JavaScript
import { n as fetchMain, t as fetchDetail } from "./utils-BhkQG3L7.mjs";
//#region lib/routes/lixin/tzgg.ts
const route = {
path: "/tzgg/:id",
categories: ["university"],
example: "/lixin/tzgg/12707",
parameters: { id: "类别 ID,`info/iList.jsp?cat_id=` 后方数字" },
name: "官网",
maintainers: ["NeverBehave"],
handler
};
async function handler(ctx) {
const { id } = ctx.req.param();
const baseUrl = "https://www.lixin.edu.cn";
const link = `${baseUrl}/info/iList.jsp?cat_id=${id}`;
const { list, title } = await fetchMain(link, "body > table > tbody > tr > td:nth-child(2) > div.xjr_list > ul > li");
const items = await fetchDetail(list, baseUrl, "body > table > tbody > tr > td:nth-child(2) > div.xjr_content");
return {
title: `${title} - 官网 - 上海立信会计金融学院`,
link,
description: `${title} - 官网 - 上海立信会计金融学院`,
item: items
};
}
//#endregion
export { route };