diff --git a/lib/v2/jandan/index.js b/lib/v2/jandan/index.js index 6614e13943..e3a45abf92 100644 --- a/lib/v2/jandan/index.js +++ b/lib/v2/jandan/index.js @@ -28,7 +28,10 @@ module.exports = async (ctx) => { link: a.attr('href'), description: art(path.join(__dirname, 'templates/description.art'), { summary: item.find('.indexs').text(), - image: item.find('img').attr('src'), + image: item + .find('img') + .attr('data-original') + .replace(/!square/, ''), }), }; }); @@ -43,6 +46,8 @@ module.exports = async (ctx) => { const content = cheerio.load(detailResponse.data); + content('.wechat-hide').prev().nextAll().remove(); + item.description += content('.entry').html(); item.author = content('.postinfo strong').text(); item.pubDate = timezone(parseDate(detailResponse.data.match(/"pubDate": "(\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2})"/)[1]), +8);