rsshub
Version:
Make RSS Great Again!
47 lines (45 loc) • 1.5 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 { t as parseDate } from "./parse-date-BrP7mxXf.mjs";
import "./helpers-DxBp0Pty.mjs";
import { t as got_default } from "./got-KxxWdaxq.mjs";
import { t as timezone } from "./timezone-D8cuwzTY.mjs";
import dayjs from "dayjs";
//#region lib/routes/techflowpost/express.ts
const route = {
path: "/express",
categories: ["finance"],
view: ViewType.Articles,
example: "/techflowpost/express",
radar: [{ source: ["techflowpost.com/newsletter/index.html"] }],
name: "快讯",
maintainers: ["nczitzk"],
handler,
url: "techflowpost.com/"
};
async function handler(ctx) {
const rootUrl = "https://www.techflowpost.com";
const currentUrl = `${rootUrl}/newsletter/index.html`;
const { data: response } = await got_default.post("https://www.techflowpost.com/ashx/newflash_index.ashx", { form: {
pageindex: 1,
pagesize: ctx.req.query("limit") ?? 50,
time: dayjs().format("YYYY/M/D HH:mm:ss")
} });
return {
title: "深潮TechFlow - 快讯",
link: currentUrl,
item: response.content.map((item) => ({
title: item.stitle,
link: `${rootUrl}/newsletter/detail_${item.nnewflash_id}.html`,
pubDate: timezone(parseDate(item.dcreate_time), 8),
updated: timezone(parseDate(item.dmodi_time), 8),
description: item.scontent
}))
};
}
//#endregion
export { route };