UNPKG

rsshub

Version:
43 lines (41 loc) 974 B
import "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import "./ofetch-BIyrKU3Y.mjs"; import "./cache-Bo__VnGm.mjs"; import "./helpers-DxBp0Pty.mjs"; import "./render-BQo6B4tL.mjs"; import "./got-KxxWdaxq.mjs"; import { n as fetchArticles, t as BASE_URL } from "./common-w0uQfcL1.mjs"; //#region lib/routes/openai/news.ts const route = { path: "/news", categories: ["programming"], example: "/openai/news", features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, name: "News", maintainers: [ "goestav", "StevenRCE0", "nczitzk" ], handler }; async function handler(ctx) { const limit = Number.parseInt(ctx.req.query("limit") || "10"); return { title: "OpenAI News", link: new URL("/news/", BASE_URL).href, item: await fetchArticles(limit) }; } //#endregion export { route };