rsshub
Version:
Make RSS Great Again!
30 lines (29 loc) • 876 B
JavaScript
import { t as cache_default } from "./cache-C1Y-9qDV.mjs";
import { i as parseList, n as fetchItem, r as getSafeLineCookieWithData, t as baseUrl } from "./utils-BnlEr9yL.mjs";
import { load } 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);
const $ = load(data);
const list = parseList($);
return {
title: "ZAKER 精读新闻",
link,
item: await pMap(list, (item) => cache_default.tryGet(item.link, () => fetchItem(item, cookie)), { concurrency: 2 })
};
}
//#endregion
export { route };