rsshub
Version:
Make RSS Great Again!
19 lines (17 loc) • 679 B
JavaScript
import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs";
import { t as parseDate } from "./parse-date-BrP7mxXf.mjs";
import { t as cache_default } from "./cache-Bo__VnGm.mjs";
import { t as timezone } from "./timezone-D8cuwzTY.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 };