rsshub
Version:
Make RSS Great Again!
89 lines (87 loc) • 2.56 kB
JavaScript
import { n as init_esm_shims, t as __dirname } from "./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 { t as art } from "./render-BQo6B4tL.mjs";
import { t as got_default } from "./got-KxxWdaxq.mjs";
import path from "node:path";
import dayjs from "dayjs";
import localizedFormat from "dayjs/plugin/localizedFormat.js";
import "dayjs/locale/zh-cn.js";
//#region lib/routes/sse/renewal.ts
init_esm_shims();
dayjs.extend(localizedFormat);
const currStatusName = [
"全部",
"已受理",
"已询问",
"通过",
"未通过",
"提交注册",
"补充审核",
"注册结果",
"中止",
"终止"
];
const route = {
path: "/renewal",
categories: ["finance"],
example: "/sse/renewal",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["kcb.sse.com.cn/home", "kcb.sse.com.cn/"] }],
name: "科创板项目动态",
maintainers: ["Jeason0228"],
handler,
url: "kcb.sse.com.cn/home"
};
async function handler() {
const pageUrl = "https://kcb.sse.com.cn/renewal/";
const host = `https://kcb.sse.com.cn`;
return {
title: "上海证券交易所 - 科创板项目动态",
link: pageUrl,
item: (await got_default("https://query.sse.com.cn/statusAction.do", {
searchParams: {
isPagination: true,
sqlId: "SH_XM_LB",
"pageHelp.pageSize": 20,
offerType: "",
commitiResult: "",
registeResult: "",
province: "",
csrcCode: "",
currStatus: "",
order: "updateDate|desc,stockAuditNum|desc",
keyword: "",
auditApplyDateBegin: "",
auditApplyDateEnd: "",
_: Date.now()
},
headers: { Referer: pageUrl }
})).data.result.map((item) => ({
title: `【${currStatusName[item.currStatus]}】${item.stockAuditName}`,
description: art(path.resolve(__dirname, "templates/renewal-c59a3d13.art"), {
item,
currStatus: currStatusName[item.currStatus],
updateDate: dayjs(item.updateDate, "YYYYMMDDHHmmss").locale("zh-cn").format("lll"),
auditApplyDate: dayjs(item.auditApplyDate, "YYYYMMDDHHmmss").locale("zh-cn").format("lll")
}),
pubDate: parseDate(item.updateDate, "YYYYMMDDHHmmss"),
link: `${host}/renewal/xmxq/index.shtml?auditId=${item.stockAuditNum}`,
author: item.stockAuditName
}))
};
}
//#endregion
export { route };