Skip to content

Commit

Permalink
fix(route): 中国经济50人论坛专家文章 (#12007)
Browse files Browse the repository at this point in the history
* 生成中国经济50人论坛专家文章的RSS

* 添加路由

* 修正link url重复斜杠的问题

* refactor: migrate to v2

* 修改了匹配条目的正则表达式,应对部分条目没有作者信息的特殊情况

* fix: fix category

---------
  • Loading branch information
sddiky authored Mar 2, 2023
1 parent c09ee60 commit be06aeb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 0 additions & 6 deletions docs/new-media.md
Original file line number Diff line number Diff line change
Expand Up @@ -2626,12 +2626,6 @@ others = 热点新闻 + 滚动新闻

</Route>

## 经济 50 人论坛

### 专家文章

<Route author="sddiky" example="/50forum" path="/50forum"/>

## 鲸跃汽车

### 首页
Expand Down
6 changes: 6 additions & 0 deletions docs/study.md
Original file line number Diff line number Diff line change
Expand Up @@ -357,6 +357,12 @@ path="/ctfhub/upcoming/:limit?"

</Route>

## 经济 50 人论坛

### 专家文章

<Route author="sddiky" example="/50forum" path="/50forum" radar="1"/>

## 领研

### 论文
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/50forum/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module.exports = {
'.': [
{
title: '专家文章',
docs: 'https://docs.rsshub.app/new-media.html#jing-ji-50-ren-lun-tan',
docs: 'https://docs.rsshub.app/study.html#jing-ji-50-ren-lun-tan',
source: ['/home/article/index/category/zhuanjia.html', '/'],
target: '/50forum',
},
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/50forum/zhuanjia.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = async (ctx) => {
.map((item) => {
item = $(item);
const link = rootUrl + item.attr('href');
const reg = /^(.+)\[(.+)\](.+)$/;
const reg = /^(.+)\[(.*)\](.+)$/;
const keyword = reg.exec(item.text().trim());
return {
title: keyword[1],
Expand Down

0 comments on commit be06aeb

Please sign in to comment.