UNPKG

rsshub

Version:
37 lines (35 loc) 963 B
import "./dist-Bog6z_OM.mjs"; import "./config-MQ-7ebJ_.mjs"; import "./logger-C4avouvV.mjs"; import { t as ofetch_default } from "./ofetch-DKl_Ma9g.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 };