rsshub
Version:
Make RSS Great Again!
31 lines (30 loc) • 980 B
JavaScript
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs";
import { load } from "cheerio";
//#region lib/routes/thunderbird/release.ts
const route = {
path: "/release",
categories: ["program-update"],
example: "/thunderbird/release",
name: "Changelog",
maintainers: ["garywill"],
handler
};
async function handler() {
const version = load(await rofetch("https://www.thunderbird.net/en-US/thunderbird/releases/"))(".release-container").first().find("a").last().text();
const $ = load(await rofetch(`https://www.thunderbird.net/en-US/thunderbird/${version}/releasenotes/`));
$("main section").last().remove();
$("main svg").remove();
const content = $("main").html();
return {
title: "Thunderbird release note",
link: "https://www.thunderbird.net/",
item: [{
title: `Thunderbird ${version} release`,
guid: version,
link: `https://www.thunderbird.net/en-US/thunderbird/${version}/releasenotes`,
description: content
}]
};
}
//#endregion
export { route };