diff --git a/lib/routes/the-economist/full.js b/lib/routes/the-economist/full.js index 73c80c3eb..2cb9e70a9 100644 --- a/lib/routes/the-economist/full.js +++ b/lib/routes/the-economist/full.js @@ -18,13 +18,11 @@ module.exports = async (ctx) => { }); const $ = cheerio.load(response.data); - $('.newsletter-form--inline').remove(); - $('.blog-post__asideable-wrapper').remove(); - - content = '
[' + $('h1 .flytitle-and-title__flytitle').text() + ']
'; - content += '
' + $('.blog-post__description').text() + '
'; - content += '
'; - content += $('.blog-post__inner').html(); + $('aside').remove(); + $('div.ds-chapter-list').remove(); + content = $('div.article__lead-image').html(); + content += $('header.article__header').html(); + content += $('div.layout-article-body').attr('itemprop', 'text').html(); ctx.cache.set(link, content); @@ -32,7 +30,7 @@ module.exports = async (ctx) => { }; const items = await Promise.all( - feed.items.map(async (item) => ({ + feed.items.slice(0, 10).map(async (item) => ({ title: item.title, description: await getFullText(item.link), link: item.link,