UNPKG

rsshub

Version:
19 lines (18 loc) 695 B
import { t as rofetch } from "./ofetch-U0CdpE2g.mjs"; import { t as parseDate } from "./parse-date-3kcy2Eau.mjs"; import { t as cache_default } from "./cache-C1Y-9qDV.mjs"; import { t as timezone } from "./timezone-UiMFOuvL.mjs"; import { load } from "cheerio"; //#region lib/routes/bjnews/utils.ts function fetchArticle(item) { return cache_default.tryGet(item.link, async () => { const responses = await rofetch(item.link); const $d = load(responses); 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 };