diff --git a/docs/README.md b/docs/README.md index 634cc0aaa5..444b9ca6a2 100644 --- a/docs/README.md +++ b/docs/README.md @@ -642,7 +642,7 @@ RSSHub 提供下列 API 接口: ### 虎扑 - + ### Dcard diff --git a/lib/router.js b/lib/router.js index 8c53f9128b..e18202bec2 100644 --- a/lib/router.js +++ b/lib/router.js @@ -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')); diff --git a/lib/routes/hupu/bxj.js b/lib/routes/hupu/bbs.js similarity index 93% rename from lib/routes/hupu/bxj.js rename to lib/routes/hupu/bbs.js index 1a8e3dae87..814a0a22a6 100644 --- a/lib/routes/hupu/bxj.js +++ b/lib/routes/hupu/bbs.js @@ -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, }; };