diff --git a/lib/v2/zhihu/posts.js b/lib/v2/zhihu/posts.js index 74ce0c149..fed662852 100644 --- a/lib/v2/zhihu/posts.js +++ b/lib/v2/zhihu/posts.js @@ -18,7 +18,8 @@ module.exports = async (ctx) => { const data = response.data; const $ = cheerio.load(data); const jsondata = $('#js-initialData'); - const authorname = $('.ProfileHeader-name').text(); + const authorname = $('.ProfileHeader-name').contents() + .filter((_index, element) => element.type === 'text').text(); const authordescription = $('.ProfileHeader-headline').text(); const parsed = JSON.parse(jsondata.html());