mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-06 21:18:57 +08:00
增加摩根大通研究所 (#1513)
* feat: support jpmorganchase * fix: add host to link
This commit is contained in:
@@ -2876,3 +2876,7 @@ board 和 build 可在[这里](http://api.ineal.me/tss/status)查看
|
|||||||
### 日报 | D2 资源库
|
### 日报 | D2 资源库
|
||||||
|
|
||||||
<route name="日报 | D2 资源库" author="Andiedie" example="/d2/daily" path="/d2/daily"/>
|
<route name="日报 | D2 资源库" author="Andiedie" example="/d2/daily" path="/d2/daily"/>
|
||||||
|
|
||||||
|
### 加摩根大通研究所
|
||||||
|
|
||||||
|
<route name="新闻" author="howel.52" example="/jpmorganchase" path="/jpmorganchase"/>
|
||||||
|
|||||||
@@ -1040,6 +1040,9 @@ router.get('/ebb', require('./routes/ebb'));
|
|||||||
// Indienova
|
// Indienova
|
||||||
router.get('/indienova/article', require('./routes/indienova/article'));
|
router.get('/indienova/article', require('./routes/indienova/article'));
|
||||||
|
|
||||||
|
// JPMorgan Chase Institute
|
||||||
|
router.get('/jpmorganchase', require('./routes/jpmorganchase/research'));
|
||||||
|
|
||||||
// 美拍
|
// 美拍
|
||||||
router.get('/meipai/user/:uid', require('./routes/meipai/user'));
|
router.get('/meipai/user/:uid', require('./routes/meipai/user'));
|
||||||
|
|
||||||
|
|||||||
31
lib/routes/jpmorganchase/research.js
Normal file
31
lib/routes/jpmorganchase/research.js
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
const axios = require('../../utils/axios');
|
||||||
|
const cheerio = require('cheerio');
|
||||||
|
|
||||||
|
const url = 'https://www.jpmorganchase.com';
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const response = await axios({
|
||||||
|
method: 'get',
|
||||||
|
url: `${url}/corporate/institute/research.htm`,
|
||||||
|
});
|
||||||
|
|
||||||
|
const title = 'All Reports';
|
||||||
|
const $ = cheerio.load(response.data);
|
||||||
|
|
||||||
|
const items = $('.globalphilsect')
|
||||||
|
.map((index, item) => {
|
||||||
|
item = $(item);
|
||||||
|
return {
|
||||||
|
title: item.find('.chaseanalytics-track-link').text(),
|
||||||
|
link: `${url}${item.find('.chaseanalytics-track-link').attr('href')}`,
|
||||||
|
description: item.find('.lead-in + p').text(),
|
||||||
|
pubDate: item.find('.lead-in').text(),
|
||||||
|
};
|
||||||
|
})
|
||||||
|
.get();
|
||||||
|
ctx.state.data = {
|
||||||
|
title: `${title} - JPMorgan Chase Institute`,
|
||||||
|
link: url,
|
||||||
|
description: `${title} - JPMorgan Chase Institute`,
|
||||||
|
item: items,
|
||||||
|
};
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user