UNPKG

rsshub

Version:
45 lines (43 loc) 1.34 kB
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 { t as parseDate } from "./parse-date-r5WDWHno.mjs"; import "./helpers-Bo4JQYdN.mjs"; import { t as got_default } from "./got-CO-ndVl2.mjs"; import { t as timezone } from "./timezone-CA9Huotp.mjs"; //#region lib/routes/techflowpost/index.ts const route = { path: "/", example: "/techflowpost", radar: [{ source: ["techflowpost.com/"] }], name: "首页", categories: ["finance"], view: ViewType.Articles, maintainers: ["nczitzk"], handler, url: "techflowpost.com/" }; async function handler(ctx) { const rootUrl = "https://www.techflowpost.com"; const { data: response } = await got_default.post("https://www.techflowpost.com/ashx/index.ashx", { form: { pageindex: 1, pagesize: ctx.req.query("limit") ?? 50 } }); return { title: "深潮TechFlow", link: rootUrl, item: response.content.map((item) => ({ title: item.stitle, author: item.sauthor_name, link: `${rootUrl}/article/detail_${item.narticle_id}.html`, category: [item.new_scata_name], pubDate: timezone(parseDate(item.dcreate_time), 8), updated: timezone(parseDate(item.dmodi_time), 8), description: item.scontent })) }; } //#endregion export { route };