rsshub
Version:
Make RSS Great Again!
59 lines (57 loc) • 1.75 kB
JavaScript
import "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import "./parse-date-BrP7mxXf.mjs";
import "./cache-Bo__VnGm.mjs";
import "./helpers-DxBp0Pty.mjs";
import "./got-KxxWdaxq.mjs";
import "./timezone-D8cuwzTY.mjs";
import "./wechat-mp-Dq_pp853.mjs";
import { t as utils_default } from "./utils-Bdr8-nWs.mjs";
//#region lib/routes/nua/sxw.ts
const route = {
path: "/sxw/:type",
categories: ["university"],
example: "/nua/sxw/230",
parameters: { type: "News Type" },
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: true,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["sxw.nua.edu.cn/:type/list.htm"] }],
name: "Shuangxing Information",
maintainers: ["evnydd0sf"],
handler,
description: `| News Type | Parameters |
| --------- | ---------- |
| 校园电视 | 230 |
| 院部动态 | 232 |
| 动感校园 | 233 |
| 招就指南 | 234 |
| 南艺院报 | 236 |`
};
async function handler(ctx) {
const type = ctx.req.param("type");
const baseUrl = "https://sxw.nua.edu.cn";
const newsUrl = `${baseUrl}/${type}/list.htm`;
const listName = "li.list_item";
const listDate = ".Article_PublishDate";
const webPageName = ".Column_Anchor";
const artiContent = ".read";
const items = await utils_default.ProcessList(newsUrl, baseUrl, listName, listDate, webPageName);
const results = await utils_default.ProcessFeed(items[0], artiContent);
return {
title: "NUA-双馨网-" + items[1],
link: newsUrl,
description: "南京艺术学院 双馨网 " + items[1],
item: results
};
}
//#endregion
export { route };