UNPKG

rsshub

Version:
52 lines (50 loc) 1.52 kB
import "./dist-Bog6z_OM.mjs"; import "./config-MQ-7ebJ_.mjs"; import "./logger-C4avouvV.mjs"; import "./ofetch-DKl_Ma9g.mjs"; import { t as parseDate } from "./parse-date-r5WDWHno.mjs"; import "./helpers-Bo4JQYdN.mjs"; import { t as got_default } from "./got-CO-ndVl2.mjs"; import { t as timezone } from "./timezone-CA9Huotp.mjs"; import { load } from "cheerio"; //#region lib/routes/nju/dafls.ts const route = { path: "/dafls", categories: ["university"], example: "/nju/dafls", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["dafls.nju.edu.cn/13167/list.html", "dafls.nju.edu.cn/"] }], name: "大学外语部", maintainers: ["ret-1"], handler, url: "dafls.nju.edu.cn/13167/list.html" }; async function handler() { return { title: "大外部-通知公告", link: "https://dafls.nju.edu.cn/13167/list.htm", item: [...(await Promise.all(Object.keys({ tzgg: "通知公告" }).map(async (c) => { const data = (await got_default(`https://dafls.nju.edu.cn/13167/list.htm`)).data; const $ = load(data); return $("#article97").map((index, item) => { item = $(item); return { title: item.find("a").last().text(), link: "https://dafls.nju.edu.cn" + item.find("a").attr("href"), pubDate: timezone(parseDate(item.find("span").last().text(), "YYYY-MM-DD"), 8), category: c }; }); })))[0]] }; } //#endregion export { route };