rsshub
Version:
Make RSS Great Again!
69 lines (67 loc) • 2.13 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 { 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/discography.ts
init_esm_shims();
const route = {
path: "/disco",
categories: ["live"],
example: "/lxixsxa/disco",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["www.lxixsxa.com/", "www.lxixsxa.com/discography"] }],
name: "Latest Discography",
maintainers: ["Kiotlin"],
handler,
url: "www.lxixsxa.com/"
};
async function handler() {
const api = "https://www.sonymusic.co.jp/json/v2/artist/lisa/discography/start/0/count/-1";
const url = "https://www.sonymusic.co.jp/artist/lisa/discography";
return {
title: "LATEST DISCOGRAPHY",
link: url,
description: "LiSA's Latest Albums",
item: parseJSONP((await got_default({
method: "get",
url: api
})).data).items.map((item) => ({
title: item.title,
referID: item.representative_goods_number,
imageLink: item.image === "" ? item.image_original : item.image,
type: item.type,
releaseDate: item.release_date,
price: item.price === "" ? "Unknown Yet" : item.price + " (Tax Inclusive)",
description: item.comment,
comment: item.catch_copy === "" ? "今日もいい日だ!" : item.catch_copy
})).map((item) => ({
title: item.title,
description: art(path.join(__dirname, "templates/disco-ae443883.art"), {
comment: item.comment,
type: item.type,
price: item.price,
image: item.imageLink,
description: item.description
}),
pubDate: parseDate(item.releaseDate),
link: `${url}/${item.referID}`
}))
};
}
//#endregion
export { route };