rsshub
Version:
Make RSS Great Again!
31 lines (30 loc) • 964 B
JavaScript
import { t as rofetch } from "./ofetch-W1aeTHCo.mjs";
//#region lib/routes/kzo.moe/lastupdate.ts
const route = {
path: "/",
categories: ["anime"],
example: "/kzo.moe",
name: "Latest",
maintainers: ["CoderTonyChan"],
handler
};
async function handler() {
const link = "https://kzo.moe/";
return {
title: "Kmoe",
link,
item: (await rofetch(link)).matchAll(/disp_divinfo\(\s*"div_info_"\+"\d+",\s*"([^"]*)",\s*"([^"]*)",\s*"[^"]*",\s*"([^"]*)",\s*"[^"]*",\s*"([^"]*)",\s*"[^"]*",\s*"([^"]*)",\s*"([^"]*)",\s*"([^"]*)"/g).toArray().map(([, bookUrl, coverUrl, tagJp, tagEnd, score, name, author]) => ({
title: name,
description: `
<img src="${coverUrl}" />
<h1>${name}</h1>
<h2>${author}</h2>
<h2>${score}</h2>
<h2>${[tagJp === "" ? "日語" : "", tagEnd === "" ? "完結" : ""].filter(Boolean).join(" ")}</h2>
`.trim(),
link: bookUrl
}))
};
}
//#endregion
export { route };