rsshub
Version:
Make RSS Great Again!
45 lines (43 loc) • 1.2 kB
JavaScript
import "./dist-Bog6z_OM.mjs";
import "./config-MQ-7ebJ_.mjs";
import { t as ViewType } from "./types-gOySfSXJ.mjs";
import "./logger-C4avouvV.mjs";
import "./ofetch-DKl_Ma9g.mjs";
import "./parse-date-r5WDWHno.mjs";
import "./is-worker-DESPicPc.mjs";
import "./cache-SV6W5EPy.mjs";
import { n as baseUrl, r as processItems, t as apiBaseUrl } from "./util-5_T6uPah.mjs";
//#region lib/routes/tmtpost/new.ts
const handler = async (ctx) => {
const limit = Number.parseInt(ctx.req.query("limit") ?? "30", 10);
const targetUrl = new URL("new", baseUrl).href;
const listApiUrl = new URL("v1/lists/new", apiBaseUrl).href;
return await processItems(limit, {}, listApiUrl, targetUrl);
};
const route = {
path: "/new",
name: "最新",
url: "www.tmtpost.com",
maintainers: ["nczitzk"],
handler,
example: "/tmtpost/new",
parameters: void 0,
description: void 0,
categories: ["new-media"],
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportRadar: true,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{
source: ["www.tmtpost.com"],
target: "/new"
}],
view: ViewType.Articles
};
//#endregion
export { handler, route };