rsshub
Version:
Make RSS Great Again!
39 lines (37 loc) • 1.1 kB
JavaScript
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 "./cache-Bo__VnGm.mjs";
import "./helpers-DxBp0Pty.mjs";
import "./got-KxxWdaxq.mjs";
import { t as utils_default } from "./utils-DV3jjdsG.mjs";
//#region lib/routes/sobooks/date.ts
const route = {
path: "/date/:date?",
categories: ["reading"],
example: "/sobooks/date/2020-11",
parameters: { date: "日期,见例子,默认为当前年月" },
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{
source: ["sobooks.net/:category"],
target: "/:category"
}],
name: "归档",
maintainers: ["nczitzk"],
handler
};
async function handler(ctx) {
return await utils_default(ctx, `books/date/${(ctx.req.param("date") ?? `${(/* @__PURE__ */ new Date()).getFullYear()}/${(/* @__PURE__ */ new Date()).getMonth()}`).replace("-", "/")}`);
}
//#endregion
export { route };