UNPKG

rsshub

Version:
17 lines (16 loc) 515 B
import { t as got_default } from "./got-BTowW50G.mjs"; import { load } from "cheerio"; //#region lib/routes/csust/utils.ts async function getNoticeContent(item) { const $ = load((await got_default(item.link)).body); const pageTitle = $("title").text(); const $content = $(".v_news_content"); $content.find("style, .vsbcontent_end").remove(); return { ...item, title: pageTitle.slice(0, pageTitle.lastIndexOf("-")).trim(), description: $content.html() }; } //#endregion export { getNoticeContent as t };