rsshub
Version:
Make RSS Great Again!
40 lines (38 loc) • 1.11 kB
JavaScript
import "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import { t as ViewType } from "./types-D84BRIt4.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs";
import { load } from "cheerio";
//#region lib/routes/imhcg/blog.ts
const route = {
path: "/",
categories: ["blog"],
view: ViewType.Notifications,
example: "/imhcg",
parameters: {},
radar: [{ source: ["infos.imhcg.cn"] }],
name: "Engineering blogs",
maintainers: ["ZiHao256", "qzydustin"],
handler,
url: "infos.imhcg.cn"
};
async function handler() {
const $ = load(await ofetch_default("https://infos.imhcg.cn/"));
return {
title: `Engineering Blogs`,
link: "https://infos.imhcg.cn/",
item: $("li").toArray().map((item) => {
return {
title: $(item).find("a.article-title").text(),
link: $(item).find("a.article-title").attr("href"),
author: $(item).find("p.article-author").text(),
time: $(item).find("p.article-time").text(),
description: $(item).find("p.article-text").text()
};
})
};
}
//#endregion
export { route };