rsshub
Version:
Make RSS Great Again!
34 lines (33 loc) • 904 B
JavaScript
import { t as rofetch } from "./ofetch-U0CdpE2g.mjs";
import { n as parseRelativeDate } from "./parse-date-3kcy2Eau.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 response = await rofetch(currentUrl);
const $ = load(response);
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 };