rsshub
Version:
Make RSS Great Again!
54 lines (52 loc) • 1.43 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 path from "node:path";
//#region lib/routes/bandcamp/weekly.ts
init_esm_shims();
const route = {
path: "/weekly",
categories: ["multimedia"],
example: "/bandcamp/weekly",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
radar: [{ source: ["bandcamp.com/"] }],
name: "Weekly",
maintainers: ["nczitzk"],
handler,
url: "bandcamp.com/"
};
async function handler() {
const rootUrl = "https://bandcamp.com";
return {
title: "Bandcamp Weekly",
link: rootUrl,
item: (await got_default({
method: "get",
url: `${rootUrl}/api/bcweekly/3/list`
})).data.results.slice(0, 50).map((item) => ({
title: item.title,
link: `${rootUrl}/?show=${item.id}`,
pubDate: parseDate(item.published_date),
description: art(path.join(__dirname, "templates/weekly-96118d03.art"), {
v2_image_id: item.v2_image_id,
desc: item.desc
})
}))
};
}
//#endregion
export { route };