UNPKG

rsshub

Version:
36 lines (34 loc) 1.04 kB
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 { t as cache_default } from "./cache-Bo__VnGm.mjs"; import "./helpers-DxBp0Pty.mjs"; import "./render-BQo6B4tL.mjs"; import { t as got_default } from "./got-KxxWdaxq.mjs"; import { n as apiRootUrl, r as rootUrl, t as ProcessItems } from "./utils-Df2b8tML.mjs"; //#region lib/routes/hk01/tag.ts const route = { path: "/tag/:id?", radar: [{ source: ["hk01.com/tag/:id", "hk01.com/"] }], name: "Unknown", maintainers: [], handler }; async function handler(ctx) { const id = ctx.req.param("id") ?? "1"; const currentUrl = `${rootUrl}/tag/${id}`; const items = await ProcessItems((await got_default({ method: "get", url: `${apiRootUrl}/v2/feed/tag/${id}` })).data.items, ctx.req.query("limit"), cache_default.tryGet); return { title: `${id} | 香港01`, link: currentUrl, item: items }; } //#endregion export { route };