diff --git a/docs/finance.md b/docs/finance.md
index 5ca9d2c5e..c2064aab9 100644
--- a/docs/finance.md
+++ b/docs/finance.md
@@ -243,6 +243,20 @@ pageClass: routes
+### 专家
+
+
+
+| 李迅雷 | 夏斌 |
+| --- | -- |
+| 17 | 35 |
+
+
+
+### 金融热点
+
+
+
## 淘股吧股票论坛
### 论坛总版
diff --git a/lib/v2/chinacef/experts.js b/lib/v2/chinacef/experts.js
new file mode 100644
index 000000000..2e90e1785
--- /dev/null
+++ b/lib/v2/chinacef/experts.js
@@ -0,0 +1,52 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { art } = require('@/utils/render');
+const path = require('path');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const response = await got(`http://www.chinacef.cn/index.php/experts/zjmain/experts_id/${ctx.params.experts_id}`);
+
+ const data = response.data;
+
+ const $ = cheerio.load(data);
+
+ const domArray = $('div[class^="leftnews"]');
+ const itemAuthor = $('div[class=right515name] h3').text().trim();
+ const siteLink = 'http://www.chinacef.cn';
+ const rssTitle = $('title').text().trim();
+
+ const itemArray = await Promise.all(
+ domArray
+ .filter((index, item) => undefined !== $(item).find('h2 > a').attr('href'))
+ .map(async (index, item) => {
+ item = $(item);
+ const itemLink = siteLink + item.find('h2 > a').attr('href');
+ const detail = await ctx.cache.tryGet(itemLink, async () => {
+ const result = await got.get(itemLink);
+ const $ = cheerio.load(result.data);
+ const description = art(path.join(__dirname, 'templates/work_description.art'), {
+ desc: $('.newsmaintext').first().html().trim(),
+ });
+ return {
+ title: $('.contenttitle').first().html().trim(),
+ article: description,
+ };
+ });
+
+ return {
+ title: detail.title,
+ description: detail.article,
+ link: itemLink,
+ pubDate: parseDate(item.find('span').first().text(), 'YYYY-MM-DD'),
+ author: itemAuthor,
+ };
+ })
+ );
+
+ ctx.state.data = {
+ title: rssTitle,
+ link: siteLink,
+ item: itemArray,
+ };
+};
diff --git a/lib/v2/chinacef/hot.js b/lib/v2/chinacef/hot.js
new file mode 100644
index 000000000..bd0f50526
--- /dev/null
+++ b/lib/v2/chinacef/hot.js
@@ -0,0 +1,53 @@
+const got = require('@/utils/got');
+const cheerio = require('cheerio');
+const { art } = require('@/utils/render');
+const path = require('path');
+const { parseDate } = require('@/utils/parse-date');
+
+module.exports = async (ctx) => {
+ const response = await got.get('http://www.chinacef.cn/index.php/index/index');
+
+ const data = response.data;
+
+ const $ = cheerio.load(data);
+
+ const domArray = $('#boardright ul');
+ const siteLink = 'http://www.chinacef.cn';
+ const rssTitle = '金融热点 - 首席经济学家论坛';
+
+ const itemArray = await Promise.all(
+ domArray
+ .map(async (index, item) => {
+ item = $(item);
+ const itemLink = siteLink + item.find('li a').attr('href');
+ const detail = await ctx.cache.tryGet(itemLink, async () => {
+ const result = await got.get(itemLink);
+ const $ = cheerio.load(result.data);
+ const description = art(path.join(__dirname, 'templates/work_description.art'), {
+ desc: $('.newsmaintext').first().html().trim(),
+ });
+ return {
+ title: $('.contenttitle').first().html().trim(),
+ author: $('.zzinfo').find('h2').first().text().trim(),
+ pubDate: parseDate($('.divwidth').text().trim().split(' ')[3], 'YYYY-MM-DD'),
+ article: description,
+ };
+ });
+
+ return {
+ title: detail.title,
+ description: detail.article,
+ link: itemLink,
+ pubDate: detail.pubDate,
+ author: detail.author,
+ };
+ })
+ .get()
+ );
+
+ ctx.state.data = {
+ title: rssTitle,
+ link: siteLink,
+ item: itemArray,
+ };
+};
diff --git a/lib/v2/chinacef/maintainer.js b/lib/v2/chinacef/maintainer.js
index ea25bbdb5..d2813e175 100644
--- a/lib/v2/chinacef/maintainer.js
+++ b/lib/v2/chinacef/maintainer.js
@@ -1,3 +1,5 @@
module.exports = {
- '/chinacef': ['FledgeXu'],
+ '/': ['FledgeXu'],
+ '/:experts_id': ['kdanfly'],
+ '/portal/hot': ['kdanfly'],
};
diff --git a/lib/v2/chinacef/radar.js b/lib/v2/chinacef/radar.js
index 6a390fdcb..d9e913b28 100644
--- a/lib/v2/chinacef/radar.js
+++ b/lib/v2/chinacef/radar.js
@@ -8,6 +8,18 @@ module.exports = {
source: ['/'],
target: '/chinacef',
},
+ {
+ title: '专家文章',
+ docs: 'https://docs.rsshub.app/finance.html#shou-xi-jing-ji-xue-jia-lun-tan-zhuan-jia',
+ source: ['/index.php/experts/zjmain/experts_id/:experts_id'],
+ target: '/chinacef/:experts_id',
+ },
+ {
+ title: '金融热点',
+ docs: 'https://docs.rsshub.app/finance.html#shou-xi-jing-ji-xue-jia-lun-tan-jin-rong-re-dian',
+ source: ['/index.php/index/index'],
+ target: '/chinacef/portal/hot',
+ },
],
},
};
diff --git a/lib/v2/chinacef/router.js b/lib/v2/chinacef/router.js
index 20c52b09d..6a78094f4 100644
--- a/lib/v2/chinacef/router.js
+++ b/lib/v2/chinacef/router.js
@@ -1,3 +1,5 @@
module.exports = function (router) {
+ router.get('/:experts_id', require('./experts'));
+ router.get('/portal/hot', require('./hot'));
router.get('/', require('./index'));
};
diff --git a/lib/v2/chinacef/templates/work_description.art b/lib/v2/chinacef/templates/work_description.art
new file mode 100644
index 000000000..25baa934c
--- /dev/null
+++ b/lib/v2/chinacef/templates/work_description.art
@@ -0,0 +1 @@
+
{{ desc }}