rsshub
Version:
Make RSS Great Again!
34 lines (33 loc) • 1.05 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/testerhome/newest.ts
const route = {
path: "/newest",
categories: ["programming"],
example: "/testerhome/newest",
name: "最新发布",
maintainers: ["xyqfer"],
handler
};
async function handler() {
const $ = load(await rofetch("https://testerhome.com/topics/last"));
return {
title: "TesterHome-最新发布",
link: "https://testerhome.com/topics/last",
description: "TesterHome软件测试社区,人气最旺的软件测试技术门户,提供软件测试社区交流,测试沙龙。",
item: $(".item-list .topic").toArray().map((elem) => {
const $item = $(elem);
const a = $item.find(".title a");
const title = a.attr("title") ?? "";
return {
title,
link: `https://testerhome.com${a.attr("href")}`,
description: title,
pubDate: parseDate($item.find("abbr.timeago").attr("title"))
};
})
};
}
//#endregion
export { route };