rsshub
Version:
Make RSS Great Again!
52 lines (50 loc) • 1.24 kB
JavaScript
import "./esm-shims-CzJ_djXG.mjs";
import "./config-C37vj7VH.mjs";
import "./dist-BInvbO1W.mjs";
import "./logger-Czu8UMNd.mjs";
import "./ofetch-BIyrKU3Y.mjs";
import "./parse-date-BrP7mxXf.mjs";
import "./timezone-D8cuwzTY.mjs";
import { t as common_config_default } from "./common-config-ChcwGVXn.mjs";
//#region lib/routes/newmuseum/exhibitions.ts
const route = {
path: "/exhibitions",
categories: ["travel"],
example: "/newmuseum/exhibitions",
parameters: {},
features: {
requireConfig: false,
requirePuppeteer: false,
antiCrawler: false,
supportBT: false,
supportPodcast: false,
supportScihub: false
},
name: "Exhibitions",
maintainers: ["chazeon"],
handler
};
async function handler(ctx) {
let link;
const state = ctx.req.query("state");
switch (state) {
case void 0:
case "current":
link = "https://www.newmuseum.org/exhibitions/";
break;
default: link = `https://www.newmuseum.org/exhibitions/${state}`;
}
return await common_config_default({
link,
url: link,
title: "New Museum - Exhibitions",
item: {
item: ".exh",
title: `$('.exh .title').text()`,
link: `$('.exh > a').attr('href')`,
description: `$('.exh .body-reveal').text()`
}
});
}
//#endregion
export { route };