rsshub
Version:
Make RSS Great Again!
33 lines (32 loc) • 1.02 kB
JavaScript
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs";
import { t as parseDate } from "./parse-date-CjhZE69i.mjs";
import { load } from "cheerio";
//#region lib/routes/sketch/beta.ts
const route = {
path: "/beta",
categories: ["program-update"],
example: "/sketch/beta",
name: "Beta update",
maintainers: ["Jeason0228"],
handler
};
async function handler() {
const link = "https://www.sketch.com/beta/";
const $ = load(await rofetch(link));
const [version, released] = $(".beta__release-blurb").text().trim().replaceAll(/\s+/g, " ").split(" released on ", 2);
return {
title: "Sketch Beta",
link,
description: "Sketch is a design toolkit built to help you create your best work — from your earliest ideas, through to final artwork.",
image: "https://cdn.sketchapp.com/assets/components/block-buy/logo.png",
item: [{
title: version,
description: $(".beta__release-notes").html(),
link,
pubDate: parseDate(released, "D MMMM YYYY"),
guid: version
}]
};
}
//#endregion
export { route };