UNPKG

rsshub

Version:
38 lines (36 loc) 998 B
import "./esm-shims-CzJ_djXG.mjs"; import "./config-C37vj7VH.mjs"; import "./dist-BInvbO1W.mjs"; import "./logger-Czu8UMNd.mjs"; import { t as ofetch_default } from "./ofetch-BIyrKU3Y.mjs"; import * as cheerio from "cheerio"; //#region lib/routes/psnine/game.ts const handler = async () => { const url = "https://www.psnine.com/psngame"; const response = await ofetch_default(url); const $ = cheerio.load(response); const out = $("table tr").toArray().map((item) => { const $item = $(item); return { title: $item.find(".title a").text(), link: $item.find(".title a").attr("href"), description: $item.find(".title span").text() + " " + $item.find(".twoge").text() }; }); return { title: $("head title").text(), link: url, item: out }; }; const route = { path: "/game", categories: ["game"], example: "/psnine/game", name: "游戏", maintainers: ["betta-cyber"], handler, radar: [{ source: ["psnine.com/psngame", "psnine.com"] }] }; //#endregion export { route };