rsshub
Version:
Make RSS Great Again!
56 lines (54 loc) • 1.62 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/index.ts
const route = {
path: "/index/:type",
categories: ["university"],
example: "/nua/index/346",
parameters: { type: "News Type" },
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: true,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["index.nua.edu.cn/:type/list.htm"] }],
name: "Official Information",
maintainers: ["evnydd0sf"],
handler,
description: `| News Type | Parameters |
| --------- | ---------- |
| 公告 | 346 |
| 南艺要闻 | 332 |`
};
async function handler(ctx) {
const type = ctx.req.param("type");
const baseUrl = "https://www.nua.edu.cn";
const newsUrl = `${baseUrl}/${type}/list.htm`;
const listName = "li.news";
const listDate = ".news_meta";
const webPageName = ".col_title";
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 };