UNPKG

rsshub

Version:
58 lines (56 loc) 1.51 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 "./parse-date-r5WDWHno.mjs"; import "./is-worker-DESPicPc.mjs"; import { t as cache_default } from "./cache-SV6W5EPy.mjs"; import "./helpers-Bo4JQYdN.mjs"; import { t as got_default } from "./got-CO-ndVl2.mjs"; import "./timezone-CA9Huotp.mjs"; import { t as utils_default } from "./utils-BRw0Ji1Y.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 };