UNPKG

rsshub

Version:
63 lines (61 loc) 1.78 kB
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 { t as parseDate } from "./parse-date-BrP7mxXf.mjs"; import "./helpers-DxBp0Pty.mjs"; import { t as art } from "./render-BQo6B4tL.mjs"; import { t as got_default } from "./got-KxxWdaxq.mjs"; import { t as parseJSONP } from "./jsonp-helper-DWTNjSVG.mjs"; import path from "node:path"; //#region lib/routes/lxixsxa/information.ts init_esm_shims(); const route = { path: "/info", categories: ["live"], example: "/lxixsxa/info", parameters: {}, features: { requireConfig: false, requirePuppeteer: false, antiCrawler: false, supportBT: false, supportPodcast: false, supportScihub: false }, radar: [{ source: ["www.lxixsxa.com/", "www.lxixsxa.com/info"] }], name: "News", maintainers: ["Kiotlin"], handler, url: "www.lxixsxa.com/" }; async function handler() { const api = "https://www.sonymusic.co.jp/json/v2/artist/lisa/information/start/0/count/-1"; const url = "https://www.sonymusic.co.jp/artist/lisa/info"; return { title: "NEWS", link: url, description: "Let's see what is new about LiSA.", item: parseJSONP((await got_default({ method: "get", url: api })).data).items.map((item) => ({ id: item.id, title: item.title, category: item.category, date: item.date, description: item.article })).map((item) => ({ title: item.title, description: art(path.join(__dirname, "templates/info-54cfd0c5.art"), { category: item.category, description: item.description.replaceAll("\n", "<br>") }), pubDate: parseDate(item.date), link: `${url}/${item.id}` })) }; } //#endregion export { route };