Skip to content

Commit

Permalink
fix(route): nbd (#13794)
Browse files Browse the repository at this point in the history
* fix(route): nbd

* fix: update maintainer github id

refs: #3197
  • Loading branch information
TonyRL authored Nov 14, 2023
1 parent 275094b commit 87c0b5b
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 60 deletions.
50 changes: 0 additions & 50 deletions lib/v2/nbd/article.js

This file was deleted.

5 changes: 4 additions & 1 deletion lib/v2/nbd/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ module.exports = async (ctx) => {
method: 'get',
url: item.link,
});
if (!detailResponse.url.startsWith(`${rootUrl}/`)) {
return item;
}
const content = cheerio.load(detailResponse.data);

item.description = content('.g-articl-text').html();
Expand All @@ -45,7 +48,7 @@ module.exports = async (ctx) => {
);

ctx.state.data = {
title: `${$('h1').text()} - 每经网`,
title: `${$('h1').text() || $('.u-channelname').text()} - 每经网`,
link: currentUrl,
item: items,
};
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/nbd/maintainer.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
'/daily': ['MeXunco'],
'/daily': ['yuuow'],
'/:id?': ['nczitzk'],
};
6 changes: 3 additions & 3 deletions lib/v2/nbd/radar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ module.exports = {
{
title: '分类',
docs: 'https://docs.rsshub.app/routes/finance#mei-jing-wang',
source: '/',
target: '/nbd',
source: ['/', '/columns/:id?'],
target: '/nbd/:id?',
},
{
title: '重磅原创',
docs: 'https://docs.rsshub.app/routes/finance#mei-jing-wang',
source: '/',
source: ['/', '/columns/332'],
target: '/nbd/daily',
},
],
Expand Down
2 changes: 1 addition & 1 deletion lib/v2/nbd/router.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = (router) => {
router.get('/daily', require('./article'));
router.redirect('/daily', '/nbd/332');
router.get('/:id?', require('./index'));
};
2 changes: 1 addition & 1 deletion lib/v2/zcool/maintainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = {
'/discover/:type?': ['junbaor', 'nczitzk'],
'/discover/:query?': ['nczitzk'],
'/discover/:query?/:subCate?/:hasVideo?/:city?/:college?/:recommendLevel?/:sort?': ['nczitzk'],
'/top/:type': ['mexunco'],
'/top/:type': ['yuuow'],
'/user/:uid': ['junbaor'],
};
2 changes: 1 addition & 1 deletion website/docs/routes/design.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ UI 17

### 作品总榜单 {#zhan-ku-zuo-pin-zong-bang-dan}

<Route author="mexunco" example="/zcool/top/design" path="/zcool/top/:type" paramsDesc={['推荐类型,详见下面的表格']} radar="1" rssbud="1">
<Route author="yuuow" example="/zcool/top/design" path="/zcool/top/:type" paramsDesc={['推荐类型,详见下面的表格']} radar="1" rssbud="1">

榜单类型

Expand Down
2 changes: 1 addition & 1 deletion website/docs/routes/finance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -589,7 +589,7 @@ See filters in [Report](https://www.weforum.org/reports) for Year and Platform t

### 重磅原创 {#mei-jing-wang-zhong-bang-yuan-chuang}

<Route author="MeXunco" example="/nbd/daily" path="/nbd/daily"/>
<Route author="yuuow" example="/nbd/daily" path="/nbd/daily"/>

## 前瞻网 {#qian-zhan-wang}

Expand Down
2 changes: 1 addition & 1 deletion website/docs/routes/shopping.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ For instance, in `https://www.zagg.com/en_us/new-arrivals?brand=164&cat=3038%2C3

### 最新商品 {#jiu-yun-wang-zui-xin-shang-pin}

<Route author="MeXunco" example="/wineyun/home" path="/wineyun/:category" paramsDesc={['分类名']} >
<Route author="yuuow" example="/wineyun/home" path="/wineyun/:category" paramsDesc={['分类名']} >

| 全部 | 闪购 | 秒发 | 跨境 | 尾货专场 |
| ---- | ------- | ------ | -------- | -------- |
Expand Down

0 comments on commit 87c0b5b

Please sign in to comment.