UNPKG

rsshub

Version:
42 lines (41 loc) 988 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/hot.ts const route = { path: "/hot", categories: ["new-media"], example: "/hk01/hot", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["hk01.com/hot", "hk01.com/"] }], name: "热门", maintainers: [ "hoilc", "Fatpandac", "nczitzk" ], handler, url: "hk01.com/hot" }; async function handler(ctx) { const currentUrl = `${rootUrl}/hot`; const apiUrl = `${apiRootUrl}/v2/feed/hot`; 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 };