Files
RSSHub/lib/v2/newmuseum/exhibitions.js
T
Chenxing LuoandTony b17eaf9848 feat(route): 增加了六个美国博物馆的展讯 (#9451)
* Add New York Museums with working code

* Add Guggenheim and fix Jewish Museum

* Add pubDate for Gugg and Met Exhibitions

* Update docs

* Add New Museum and MCA Chicago, update document

* Fix en route

* Add and update radar.js

* Add Brooklyn Museum

* Reformat code

* Update route and travel information

* Fix `http` -> `https` for `radar.js`

* Change some link quotations mark

* Using `parseDate` provided by the project

* Removing "insecureHTTPParser"

* Fix JewishMuseum issue

* Use regex instead of node's vm

* Update lib/v2/jewishmuseum/exhibitions.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update lib/v2/guggenheim/exhibitions.js

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update docs/en/travel.md

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

* Update docs/travel.md

Co-authored-by: Tony <TonyRL@users.noreply.github.com>

Co-authored-by: Tony <TonyRL@users.noreply.github.com>
2022-04-04 22:31:48 +08:00

28 lines
710 B
JavaScript

const buildData = require('@/utils/common-config');
module.exports = async (ctx) => {
let link;
const state = ctx.query.state;
switch (state) {
case undefined:
case 'current':
link = 'https://www.newmuseum.org/exhibitions/';
break;
default:
link = `https://www.newmuseum.org/exhibitions/${state}`;
}
ctx.state.data = await buildData({
link,
url: link,
title: 'New Museum - Exhibitions',
item: {
item: '.exh',
title: `$('.exh .title').text()`,
link: `$('.exh > a').attr('href')`,
description: `$('.exh .body-reveal').text()`,
},
});
};