UNPKG

rsshub

Version:
54 lines (52 loc) 1.52 kB
import "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs"; import { t as parseDate } from "./parse-date-BrP7mxXf.mjs"; import { t as cache_default } from "./cache-Bo__VnGm.mjs"; import { load } from "cheerio"; //#region lib/routes/gov/pudong/zwgk.ts const route = { path: "/pudong/zwgk", categories: ["government"], example: "/gov/pudong/zwgk", features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["www.pudong.gov.cn/zwgk/zxxxgk/index.html"], target: "/pudong/zwgk" }], name: "政务公开-浦东新区", maintainers: ["himingway"], handler }; async function handler() { const list = (await ofetch_default("https://www.pudong.gov.cn/zwgk-search-front/api/data/affair", { method: "POST", body: { channelList: ["5144"], pageSize: 20 } })).data.list.map((item) => ({ title: item.title, link: item.url, pubDate: parseDate(item.display_date) })); return { title: "信息公开_政务公开-上海市浦东新区门户网站", link: "https://www.pudong.gov.cn/zwgk/zxxxgk/index.html", item: await Promise.all(list.map((item) => cache_default.tryGet(item.link, async () => { item.description = load(await ofetch_default(item.link))("#ivs_content").first().html(); return item; }))) }; } //#endregion export { route };