rsshub
Version:
Make RSS Great Again!
48 lines (46 loc) • 1.35 kB
JavaScript
import "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import { t as ViewType } from "./types-D84BRIt4.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import "./parse-date-BrP7mxXf.mjs";
import "./render-BQo6B4tL.mjs";
import { n as processItems, t as baseUrl } from "./util-iMYxOXyN.mjs";
//#region lib/routes/gcores/program-previews.ts
const handler = async (ctx) => {
const limit = Number.parseInt(ctx.req.query("limit") ?? "30", 10);
const targetUrl = new URL("radios/preview", baseUrl).href;
const apiUrl = new URL("gapi/v1/program-previews", baseUrl).href;
return await processItems(limit, {
"page[limit]": limit,
include: "radio.djs,video.djs,radio.category,video.category"
}, apiUrl, targetUrl);
};
const route = {
path: "/radios/preview",
name: "预告",
url: "www.gcores.com",
maintainers: ["nczitzk"],
handler,
example: "/gcores/radios/preview",
parameters: void 0,
description: void 0,
categories: ["game"],
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportRadar: true,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{
source: ["www.gcores.com/radios/preview"],
target: "/gcores/radios/preview"
}],
view: ViewType.Notifications
};
//#endregion
export { handler, route };