UNPKG

rsshub

Version:
58 lines (56 loc) 1.51 kB
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 "./parse-date-BrP7mxXf.mjs"; import { t as cache_default } from "./cache-Bo__VnGm.mjs"; import "./helpers-DxBp0Pty.mjs"; import { t as got_default } from "./got-KxxWdaxq.mjs"; import "./timezone-D8cuwzTY.mjs"; import { t as utils_default } from "./utils-BN2TorOg.mjs"; import { load } from "cheerio"; //#region lib/routes/jianshu/home.ts const route = { path: "/home", categories: ["social-media"], view: ViewType.Articles, example: "/jianshu/home", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["www.jianshu.com/"] }], name: "首页", maintainers: [ "DIYgod", "HenryQW", "JimenezLi" ], handler, url: "www.jianshu.com/" }; async function handler() { const data = (await got_default({ method: "get", url: "https://www.jianshu.com", headers: { Referer: "https://www.jianshu.com" } })).data; const $ = load(data); const list = $(".note-list li").toArray(); const result = await utils_default.ProcessFeed(list, cache_default); return { title: "简书首页", link: "https://www.jianshu.com", description: $("meta[name=\"description\"]").attr("content"), item: result }; } //#endregion export { route };