rsshub
Version:
Make RSS Great Again!
16 lines (15 loc) • 701 B
JavaScript
import { t as rofetch } from "./ofetch-C3ts-Hud.mjs";
import { t as parseDate } from "./parse-date-Cr0wQjV_.mjs";
import { load } from "cheerio";
//#region lib/routes/qstheory/utils.ts
const baseUrl = "http://www.qstheory.cn";
const getItem = async (item) => {
const $ = load(await rofetch(item.link));
$(".fs-text, .fs-pinglun, .hidden-xs").remove();
item.author = $(".appellation").text();
item.description = $(".highlight, .text").html() || $(".content").html();
item.pubDate = parseDate($(".puttime_mobi, .pubtime, .headtitle span").text().trim().replace("发表于", "").replaceAll(/(年|月)/g, "-").replace("日", ""));
return item;
};
//#endregion
export { getItem as n, baseUrl as t };