UNPKG

rsshub

Version:
50 lines (49 loc) 1.39 kB
import { t as parseDate } from "./parse-date-Cr0wQjV_.mjs"; import { t as got_default } from "./got-BTowW50G.mjs"; //#region lib/routes/ke/results.ts const route = { path: "/researchResults", categories: ["other"], example: "/ke/researchResults", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["www.research.ke.com/researchResults"] }], name: "研究成果", maintainers: ["shaomingbo"], handler, url: "www.research.ke.com/researchResults" }; async function handler() { const { status, statusMessage, data } = await got_default({ method: "post", url: "https://research.ke.com/apis/consumer-access/index/contents/page", headers: { Referer: "https://research.ke.com/ResearchResults" }, json: { pageIndex: 1, pageSize: 9 } }); if (status !== 200) throw new Error(statusMessage); const { list } = data.data; return { title: "房地产行业研究报告", link: "https://research.ke.com/ResearchResults", description: "研究成果", item: list.map((item) => ({ title: item.title, link: `https://research.ke.com/${item.contentTypeId}/ArticleDetail?id=${item.id}`, author: item.author, description: item.guideReading, pubDate: parseDate(item.publishTime) })) }; } //#endregion export { route };