mirror of
https://github.com/DIYgod/RSSHub.git
synced 2026-09-24 23:12:34 +08:00
@@ -0,0 +1,42 @@
|
||||
const got = require('@/utils/got');
|
||||
const cheerio = require('cheerio');
|
||||
const { parseDate } = require('@/utils/parse-date');
|
||||
|
||||
module.exports = async (ctx) => {
|
||||
const { category = 'zonghezixun3' } = ctx.params;
|
||||
const baseUrl = 'http://www.mrm.com.cn';
|
||||
const link = `${baseUrl}/${category}.html`;
|
||||
|
||||
const { data: response } = await got(link);
|
||||
const $ = cheerio.load(response);
|
||||
|
||||
const list = $('#datalist_wap .li')
|
||||
.toArray()
|
||||
.map((item) => {
|
||||
item = $(item);
|
||||
const a = item.find('a');
|
||||
return {
|
||||
title: a.text().trim(),
|
||||
link: `${baseUrl}${a.attr('href')}`,
|
||||
pubDate: parseDate(item.find('.d').text(), 'YYYY.MM.DD'),
|
||||
};
|
||||
});
|
||||
|
||||
const items = await Promise.all(
|
||||
list.map((item) =>
|
||||
ctx.cache.tryGet(item.link, async () => {
|
||||
const { data } = await got(item.link);
|
||||
const $ = cheerio.load(data);
|
||||
|
||||
item.description = $('.article-cont').html();
|
||||
return item;
|
||||
})
|
||||
)
|
||||
);
|
||||
|
||||
ctx.state.data = {
|
||||
title: $('head title').text(),
|
||||
link,
|
||||
item: items,
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
'/:category?': ['TonyRL'],
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
module.exports = {
|
||||
'mrm.com.cn': {
|
||||
_name: '华储网',
|
||||
'.': [
|
||||
{
|
||||
title: '通知',
|
||||
docs: 'https://docs.rsshub.app/finance#hua-chu-wang',
|
||||
source: ['/:category'],
|
||||
target: (params) => `/mrm/${params.category.replace('.html', '')}`,
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = (router) => {
|
||||
router.get('/:category?', require('./index'));
|
||||
};
|
||||
@@ -457,6 +457,16 @@ TokenInsight also provides official RSS, you can take a look at [https://api.tok
|
||||
`http://www.nifd.cn/Research?categoryGuid=7a6a826d-b525-42aa-b550-4236e524227f` 对应 `/nifd/research/7a6a826d-b525-42aa-b550-4236e524227f`
|
||||
</Route>
|
||||
|
||||
## 华储网 {#hua-chu-wang}
|
||||
|
||||
### 通知 {#hua-chu-wang-tong-zhi}
|
||||
|
||||
<Route author="TonyRL" example="/mrm" path="/mrm/:category?" paramDesc={['分类,见下表,默认为 `zonghezixun3`']} radar="1">
|
||||
| 交易通知 | 政策规定 | 业务通知 |
|
||||
| ------------ | -------------------- | ----------------- |
|
||||
| zonghezixun3 | zhengceguiding\_list | yewutongzhi\_list |
|
||||
</Route>
|
||||
|
||||
## 汇通网 {#hui-tong-wang}
|
||||
|
||||
### 7x24 小时快讯 {#hui-tong-wang-7x24-xiao-shi-kuai-xun}
|
||||
|
||||
Reference in New Issue
Block a user