rsshub
Version:
Make RSS Great Again!
50 lines (48 loc) • 1.39 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 { t as parseDate } from "./parse-date-BrP7mxXf.mjs";
import "./helpers-DxBp0Pty.mjs";
import "./render-BQo6B4tL.mjs";
import { t as got_default } from "./got-KxxWdaxq.mjs";
import { t as timezone } from "./timezone-D8cuwzTY.mjs";
import { r as rootUrl } from "./utils-BSGbkFIV.mjs";
//#region lib/routes/yicai/brief.ts
const route = {
path: "/brief",
categories: ["traditional-media"],
example: "/yicai/brief",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["yicai.com/brief"] }],
name: "正在",
maintainers: ["sanmmm", "nczitzk"],
handler,
url: "yicai.com/brief"
};
async function handler(ctx) {
return {
title: "第一财经 - 正在",
link: `${rootUrl}/brief`,
item: (await got_default({
method: "get",
url: `${rootUrl}/api/ajax/getbrieflist?type=0&page=1&pagesize=${ctx.req.query("limit") ?? 50}`
})).data.map((item) => ({
title: item.indexTitle,
link: `${rootUrl}${item.url}`,
description: item.newcontent,
pubDate: timezone(parseDate(`${item.datekey} ${item.hm}`, "YYYY.MM.DD HH:mm"), 8)
}))
};
}
//#endregion
export { route };