UNPKG

rsshub

Version:
52 lines (50 loc) 1.56 kB
import { n as init_esm_shims, t as __dirname } from "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import "./ofetch-BIyrKU3Y.mjs"; import { t as parseDate } from "./parse-date-BrP7mxXf.mjs"; import "./helpers-DxBp0Pty.mjs"; import { t as art } from "./render-BQo6B4tL.mjs"; import { t as got_default } from "./got-KxxWdaxq.mjs"; import path from "node:path"; //#region lib/routes/houxu/memory.ts init_esm_shims(); const route = { path: "/memory", categories: ["new-media"], example: "/houxu/memory", radar: [{ source: ["houxu.app/memory", "houxu.app/"] }], name: "跟踪", maintainers: ["nczitzk"], handler, url: "houxu.app/memory" }; async function handler(ctx) { const rootUrl = "https://houxu.app"; const apiUrl = `${rootUrl}/api/1/lives/updated?limit=${ctx.req.query("limit") ?? 50}`; return { title: "后续 - 跟踪", link: `${rootUrl}/memory`, item: (await got_default({ method: "get", url: apiUrl })).data.results.map((item) => ({ guid: `${rootUrl}/lives/${item.id}#${item.last.id}`, title: item.last.link.title, link: `${rootUrl}/lives/${item.id}`, author: item.last.link.source, category: [item.title], pubDate: parseDate(item.last.create_at), description: art(path.join(__dirname, "templates/memory-943332ab.art"), { live: item.title, url: item.last.link.url, title: item.last.link.title, source: item.last.link.source, description: item.last.link.description }) })) }; } //#endregion export { route };