UNPKG

rsshub

Version:
18 lines (17 loc) 664 B
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs"; import { t as parseDate } from "./parse-date-CjhZE69i.mjs"; import { t as cache_default } from "./cache-CiDoUSLo.mjs"; import { t as timezone } from "./timezone-DE--ze1V.mjs"; import { load } from "cheerio"; //#region lib/routes/bjnews/utils.ts function fetchArticle(item) { return cache_default.tryGet(item.link, async () => { const $d = load(await rofetch(item.link)); item.pubDate = timezone(parseDate($d(".left-info .timer").text()), 8); item.author = $d(".left-info .reporter").text(); item.description = $d("#contentStr").html(); return item; }); } //#endregion export { fetchArticle as t };