rsshub
Version:
Make RSS Great Again!
36 lines (34 loc) • 1.09 kB
JavaScript
import "./dist-Bog6z_OM.mjs";
import "./config-MQ-7ebJ_.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 "./timezone-CA9Huotp.mjs";
import { i as parseList, n as fetchItem, r as getSafeLineCookieWithData, t as baseUrl } from "./utils-BwmXaWUi.mjs";
import * as cheerio from "cheerio";
import pMap from "p-map";
//#region lib/routes/zaker/focus.ts
const route = {
path: "/focusread",
radar: [{
source: ["www.myzaker.com/"],
target: "/focusread"
}],
name: "精读",
example: "/zaker/focusread",
maintainers: ["AlexdanerZe", "TonyRL"],
handler
};
async function handler() {
const link = `${baseUrl}/?pos=selected_article`;
const { cookie, data } = await getSafeLineCookieWithData(link);
return {
title: "ZAKER 精读新闻",
link,
item: await pMap(parseList(cheerio.load(data)), (item) => cache_default.tryGet(item.link, () => fetchItem(item, cookie)), { concurrency: 2 })
};
}
//#endregion
export { route };