diff --git a/lib/routes/nowcoder/discuss.js b/lib/routes/nowcoder/discuss.js index 7cfd7b1bef..388ad7609b 100644 --- a/lib/routes/nowcoder/discuss.js +++ b/lib/routes/nowcoder/discuss.js @@ -25,10 +25,8 @@ module.exports = async (ctx) => { .trim() .replace('\n', ' '), link: $(this) - .find('div.discuss-main.clearfix a') - .attr('href') - .match(/^\/discuss\/[0-9]*/gm) - .toString(), + .find('div.discuss-main.clearfix a[rel]') + .attr('href'), }; return info; }) @@ -51,9 +49,7 @@ module.exports = async (ctx) => { .text() .split(' ')[1]; - const description = $('.nc-post-content') - .html() - .trim(); + const description = $('.nc-post-content').html(); const single = { title: title,