UNPKG

rsshub

Version:
37 lines (36 loc) 982 B
import { t as rofetch } from "./ofetch-U0CdpE2g.mjs"; import { t as parseDate } from "./parse-date-3kcy2Eau.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 response = await rofetch(url); const $ = load(response); 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 };