mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-10-28 03:28:35 +08:00
feat(route): add BigQuant专题报告 (#9253)
This commit is contained in:
@@ -4,6 +4,12 @@ pageClass: routes
|
||||
|
||||
# 金融
|
||||
|
||||
## BigQuant
|
||||
|
||||
### 专题报告
|
||||
|
||||
<Route author="nczitzk" example="/bigquant/collections" path="/bigquant/collections"/>
|
||||
|
||||
## CFD
|
||||
|
||||
### 每周股指派息调整 (GBP)
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
const got = require('@/utils/got');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
const md = require('markdown-it')({
|
||||
html: true,
|
||||
});
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const rootUrl = 'https://bigquant.com';
|
||||
const currentUrl = `${rootUrl}/wiki/api/documents.list`;
|
||||
|
||||
const response = await got({
|
||||
method: 'post',
|
||||
url: currentUrl,
|
||||
json: {
|
||||
collectionId: 'c6874e5d-7f45-4e90-8cd9-5e43df3b44ef',
|
||||
direction: 'DESC',
|
||||
limit: 25,
|
||||
offset: 0,
|
||||
sort: 'publishedAt',
|
||||
},
|
||||
});
|
||||
|
||||
const items = response.data.data.map((item) => ({
|
||||
title: item.title,
|
||||
link: `${rootUrl}/wiki${item.url}`,
|
||||
description: md.render(item.text),
|
||||
pubDate: parseDate(item.publishedAt),
|
||||
}));
|
||||
|
||||
ctx.state.data = {
|
||||
title: '专题报告 - AI量化知识库 - BigQuant',
|
||||
link: `${rootUrl}/wiki/collections/c6874e5d-7f45-4e90-8cd9-5e43df3b44ef`,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/collections': ['nczitzk'],
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
'bigquant.com': {
|
||||
_name: 'BigQuant',
|
||||
'.': [
|
||||
{
|
||||
title: '专题报告',
|
||||
docs: 'https://docs.rsshub.app/finance.html#bigquant-zhuan-ti-bao-gao',
|
||||
source: '/',
|
||||
target: '/bigquant/collections',
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = function (router) {
|
||||
router.get('/collections', require('./collections'));
|
||||
};
|
||||
Reference in New Issue
Block a user