rsshub
Version:
Make RSS Great Again!
66 lines (64 loc) • 1.84 kB
JavaScript
import { n as init_esm_shims, t as __dirname } from "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import "./helpers-DxBp0Pty.mjs";
import { t as art } from "./render-BQo6B4tL.mjs";
import { t as got_default } from "./got-KxxWdaxq.mjs";
import path from "node:path";
import { load } from "cheerio";
//#region lib/routes/ymgal/game.ts
init_esm_shims();
const host = "https://www.ymgal.games";
const date = /* @__PURE__ */ new Date();
const year = date.getFullYear();
const month = date.getMonth() + 1;
const route = {
path: "/game/release",
categories: ["anime"],
example: "/ymgal/game/release",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false,
nsfw: true
},
radar: [{ source: ["ymgal.games/"] }],
name: "本月新作",
maintainers: ["SunBK201"],
handler,
url: "ymgal.games/"
};
async function handler() {
const $ = load((await got_default({
method: "get",
url: `${host}/release-list/${year}/${month}`
})).data);
const list = $(".game-view-card").toArray();
const items = list && list.map((item) => {
item = $(item);
const itemPicUrl = item.find(".lazy").first().attr("data-original");
const taginfo = item.find(".tag-info-list").children().toArray().map((elem) => $(elem).text());
return {
title: item.attr("title"),
link: `${host}${item.attr("href")}`,
description: art(path.join(__dirname, "templates/description-f4dff6d4.art"), {
itemPicUrl,
taginfo
})
};
});
return {
title: `月幕 Galgame - 本月新作`,
link: `${host}/release-list/${year}/${month}`,
description: "月幕 Galgame - 本月新作",
item: items
};
}
//#endregion
export { route };