diff --git a/lib/routes/oschina/news.js b/lib/routes/oschina/news.js index 32d2edff7..86b4d9efd 100644 --- a/lib/routes/oschina/news.js +++ b/lib/routes/oschina/news.js @@ -80,8 +80,8 @@ module.exports = async (ctx) => { }); const content = cheerio.load(detail.data); content('.ad-wrap').remove(); - item.description = content('#articleContent').html(); - item.author = content('a.__user').find('span').text(); + item.description = content('.article-detail').html(); + item.author = content('.article-box__meta .item').first().text(); ctx.cache.set(key, item.description); } } diff --git a/lib/routes/oschina/u.js b/lib/routes/oschina/u.js index 7f13152f6..2e3b6179e 100644 --- a/lib/routes/oschina/u.js +++ b/lib/routes/oschina/u.js @@ -42,7 +42,7 @@ module.exports = async (ctx) => { }); const content = cheerio.load(detail.data); content('#articleContent .ad-wrap').remove(); - item.description = content('#articleContent').html(); + item.description = content('.article-detail').html(); ctx.cache.set(key, item.description); } return Promise.resolve(item); diff --git a/lib/routes/oschina/user.js b/lib/routes/oschina/user.js index b685a66c4..936b4de61 100644 --- a/lib/routes/oschina/user.js +++ b/lib/routes/oschina/user.js @@ -42,7 +42,7 @@ module.exports = async (ctx) => { }); const content = cheerio.load(detail.data); content('.ad-wrap').remove(); - item.description = content('#articleContent').html(); + item.description = content('.article-detail').html(); ctx.cache.set(key, item.description); } return Promise.resolve(item);