UNPKG

rsshub

Version:
36 lines (35 loc) 954 B
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs"; import { t as parseDate } from "./parse-date-CjhZE69i.mjs"; import { load } from "cheerio"; //#region lib/routes/centbrowser/history.ts const route = { path: "/history", categories: ["program-update"], example: "/centbrowser/history", name: "更新日志", maintainers: ["hoilc"], handler }; async function handler() { const url = "https://centbrowser.cn/history.html"; const $ = load(await rofetch(url)); return { title: "Cent Browser 更新日志", link: url, item: $(".list").toArray().map((update) => { const $update = $(update); const version = $update.find("p").attr("id"); const date = $update.find("p > i").text().match(/\d+-\d+-\d+/)[0]; $update.find("p").remove(); return { title: version, author: "Cent Browser", description: $update.html(), link: `${url}#${date}`, pubDate: parseDate(date) }; }) }; } //#endregion export { route };