修改虎扑bbs描述 (#1664)

close #1654
This commit is contained in:
Chenyang Shi
2019-03-05 11:07:17 +08:00
committed by DIYgod
parent 03c70ca78f
commit 46b2bbac60
3 changed files with 6 additions and 5 deletions

View File

@@ -642,7 +642,7 @@ RSSHub 提供下列 API 接口:
### 虎扑
<route name="虎扑BBS步行街" author="LogicJake" example="/hupu/bxj/bxj/2" path="/hupu/bxj/:id/:order?" :paramsDesc="['栏目id可在栏目 URL 找到', '排序方式1最新回帖默认2最新发帖']"/>
<route name="虎扑BBS论坛" author="LogicJake" example="/hupu/bbs/bxj/2" path="/hupu/bbs/:id/:order?" :paramsDesc="['板块id可在板块 URL 找到', '排序方式1最新回帖默认2最新发帖']"/>
### Dcard

View File

@@ -1078,7 +1078,8 @@ router.get('/leetcode/articles', require('./routes/leetcode/articles'));
router.get('/segmentfault/channel/:name', require('./routes/segmentfault/channel'));
// 虎扑
router.get('/hupu/bxj/:id/:order?', require('./routes/hupu/bxj'));
router.get('/hupu/bxj/:id/:order?', require('./routes/hupu/bbs'));
router.get('/hupu/bbs/:id/:order?', require('./routes/hupu/bbs'));
// 牛客网
router.get('/nowcoder/discuss/:type/:order', require('./routes/nowcoder/discuss'));

View File

@@ -22,6 +22,7 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
const type_name = $('span.infoname').text();
const description = $('#des_forum').text();
const list = $('ul.for-list li')
.slice(0, 10)
@@ -59,9 +60,7 @@ module.exports = async (ctx) => {
const $ = cheerio.load(response.data);
const date = $('#tpc span.stime').text();
const description = $('div.quote-content')
.html()
.trim();
const description = $('div.quote-content').html();
const single = {
title: title,
@@ -77,6 +76,7 @@ module.exports = async (ctx) => {
ctx.state.data = {
title: `${type_name}${order_name}——虎扑步行街`,
link: link,
description: description,
item: out,
};
};