UNPKG

rsshub

Version:
18 lines (17 loc) 541 B
import { t as got_default } from "./got-DUpa1V3-.mjs"; import { load } from "cheerio"; //#region lib/routes/csust/utils.ts async function getNoticeContent(item) { const response = await got_default(item.link); const $ = load(response.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 };