mirror of
https://github.com/DIYgod/RSSHub.git
synced 2025-12-05 04:11:26 +08:00
add cbirc repo (#8267)
Co-authored-by: Tony <TonyRL@users.noreply.github.com>
This commit is contained in:
@@ -418,6 +418,16 @@ pageClass: routes
|
|||||||
|
|
||||||
<Route author="hillerliao" example="/csrc/auditstatus/:apply_id" path="/csrc/auditstatus" :paramsDesc="['事项类别id, `https://neris.csrc.gov.cn/alappl/home/xkDetail` 列表中各地址的 appMatrCde 参数']"/>
|
<Route author="hillerliao" example="/csrc/auditstatus/:apply_id" path="/csrc/auditstatus" :paramsDesc="['事项类别id, `https://neris.csrc.gov.cn/alappl/home/xkDetail` 列表中各地址的 appMatrCde 参数']"/>
|
||||||
|
|
||||||
|
## 中国银行保险监督管理委员会
|
||||||
|
|
||||||
|
<Route author="JkCheung" example="/cbirc/" path="/cbirc/:category" :paramsDesc="['类目']">
|
||||||
|
|
||||||
|
| 监管动态 | 公告通知 | 政策法规 | 政策解读 | 征求意见 | 行政许可 | 行政处罚 | 行政监管措施 | 工作论文 | 金融监管研究 | 统计信息 |
|
||||||
|
| :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: | :------: |
|
||||||
|
| jgdt | ggtz | zcfg | zcjd | zqyj | xzxk | xzcf | xzjgcs | gzlw | jrjgyj | tjxx |
|
||||||
|
|
||||||
|
</Route>
|
||||||
|
|
||||||
## 中国政府
|
## 中国政府
|
||||||
|
|
||||||
### 数据
|
### 数据
|
||||||
|
|||||||
119
lib/v2/cbirc/index.js
Normal file
119
lib/v2/cbirc/index.js
Normal file
@@ -0,0 +1,119 @@
|
|||||||
|
const got = require('@/utils/got');
|
||||||
|
|
||||||
|
const categories = {
|
||||||
|
jgdt: {
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '监管动态',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=915,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '监管动态',
|
||||||
|
},
|
||||||
|
ggtz: {
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '公告通知',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=925,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '公告通知',
|
||||||
|
},
|
||||||
|
zcfg:{
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '政策法规',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=926,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '政策法规',
|
||||||
|
},
|
||||||
|
zcjd: {
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '政策解读',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=916,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '政策解读',
|
||||||
|
},
|
||||||
|
zqyj: {
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '征求意见',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=951,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '征求意见',
|
||||||
|
},
|
||||||
|
xzxk:{
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '行政许可',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=930,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '行政许可',
|
||||||
|
},
|
||||||
|
xzcf:{
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '行政处罚',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=931,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '行政处罚',
|
||||||
|
},
|
||||||
|
xzjgcs:{
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '行政监管措施',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=932,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '行政监管措施',
|
||||||
|
},
|
||||||
|
gzlw:{
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '工作论文',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=934,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '工作论文',
|
||||||
|
},
|
||||||
|
jrzgyj:{
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '金融监管研究',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=935,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '金融监管研究',
|
||||||
|
},
|
||||||
|
tjxx:{
|
||||||
|
baseUrl: `http://www.cbirc.gov.cn`,
|
||||||
|
description: '统计信息',
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectDocByItemIdAndChild/data_itemId=954,pageIndex=1,pageSize=18.json`,
|
||||||
|
title: '统计信息',
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
async function getContent(item) {
|
||||||
|
const response = await got({
|
||||||
|
method: 'get',
|
||||||
|
url: 'http://www.cbirc.gov.cn/cn/static/data/DocInfo/SelectByDocId/data_docId=' + item.docId + '.json',
|
||||||
|
});
|
||||||
|
return response.data.data.docClob;
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = async (ctx) => {
|
||||||
|
const category = ctx.params.category ?? 'ggtz';
|
||||||
|
const cat = categories[category];
|
||||||
|
|
||||||
|
// 请求集合
|
||||||
|
const response = await ctx.cache.tryGet(cat.link, async () => {
|
||||||
|
const resp = await got({
|
||||||
|
method: 'get',
|
||||||
|
url: cat.link,
|
||||||
|
header: {
|
||||||
|
Referer: `http://www.cbirc.gov.cn`,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return resp.data;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 遍历数据集合
|
||||||
|
const dataLs = await Promise.all(
|
||||||
|
response.data.rows.map(async (item) => {
|
||||||
|
const content = await getContent(item);
|
||||||
|
return {
|
||||||
|
title: item.docTitle,
|
||||||
|
// 文章正文
|
||||||
|
description: content,
|
||||||
|
// 文章发布时间
|
||||||
|
pubDate: item.publishDate,
|
||||||
|
// 文章链接
|
||||||
|
link: `http://www.cbirc.gov.cn/cn/view/pages/ItemDetail.html?docId=${item.docId}&itemId=925&generaltype=0`,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
||||||
|
ctx.state.data = {
|
||||||
|
title: `中国银保监会-${cat.title}`,
|
||||||
|
link: cat.link,
|
||||||
|
description: `中国银保监会-${cat.title}`,
|
||||||
|
item: dataLs,
|
||||||
|
language: 'zh-CN',
|
||||||
|
};
|
||||||
|
};
|
||||||
3
lib/v2/cbirc/maintainer.js
Normal file
3
lib/v2/cbirc/maintainer.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module.exports = {
|
||||||
|
'/:category?': ['JkCheung'],
|
||||||
|
};
|
||||||
13
lib/v2/cbirc/radar.js
Normal file
13
lib/v2/cbirc/radar.js
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
module.exports = {
|
||||||
|
'cbirc.gov.cn': {
|
||||||
|
_name: '中国银行保险监督管理委员会',
|
||||||
|
'.': [
|
||||||
|
{
|
||||||
|
title: '分类',
|
||||||
|
docs: 'https://docs.rsshub.app/government.html#zhong-guo-yin-xing-bao-xian-jian-du-guan-li-wei-yuan-hui',
|
||||||
|
source: ['/:category', '/'],
|
||||||
|
target: '/cbirc/:category?',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
};
|
||||||
3
lib/v2/cbirc/router.js
Normal file
3
lib/v2/cbirc/router.js
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
module.exports = function (router) {
|
||||||
|
router.get('/:category?', require('./index'));
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user