fix: error in nowcoder/discuss (#3884)

This commit is contained in:
junfengP
2020-02-04 20:48:35 +08:00
committed by GitHub
parent 147b31b779
commit 5dc2ad693a

View File

@@ -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,