UNPKG

rsshub

Version:
33 lines (32 loc) 876 B
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs"; import { n as parseRelativeDate } from "./parse-date-CjhZE69i.mjs"; import { load } from "cheerio"; //#region lib/routes/xyplorer/whatsnew.ts const route = { path: "/whatsnew", categories: ["program-update"], example: "/xyplorer/whatsnew", name: "What's New", maintainers: ["nczitzk"], handler }; async function handler() { const currentUrl = `https://www.xyplorer.com/whatsnew.php`; const $ = load(await rofetch(currentUrl)); const items = $(".waznu").toArray().map((item) => { const $item = $(item); return { link: currentUrl, description: `<ul>${$item.html()}</ul>`, title: $item.prev().prev().text(), pubDate: parseRelativeDate($item.prev().text().replace("released ", "")) }; }); return { title: $("title").text(), link: currentUrl, item: items }; } //#endregion export { route };