UNPKG

rsshub

Version:
19 lines (17 loc) 679 B
import { t as ofetch_default } from "./ofetch-DKl_Ma9g.mjs"; import { t as parseDate } from "./parse-date-r5WDWHno.mjs"; import { t as cache_default } from "./cache-SV6W5EPy.mjs"; import { t as timezone } from "./timezone-CA9Huotp.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 ofetch_default(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 };