UNPKG

rsshub

Version:
38 lines (37 loc) 949 B
import { t as got_default } from "./got-DUpa1V3-.mjs"; import { n as apiRootUrl, r as rootUrl, t as ProcessItems } from "./utils-BPZUex7p.mjs"; //#region lib/routes/hk01/latest.ts const route = { path: "/latest", categories: ["new-media"], example: "/hk01/latest", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["hk01.com/latest", "hk01.com/"] }], name: "即時", maintainers: ["5upernova-heng"], handler, url: "hk01.com/latest" }; async function handler(ctx) { const currentUrl = `${rootUrl}/latest`; const apiUrl = `${apiRootUrl}/v2/page/latest`; const response = await got_default({ method: "get", url: apiUrl }); return { title: "即時 | 香港01", link: currentUrl, item: await ProcessItems(response.data.items, ctx.req.query("limit")) }; } //#endregion export { route };