From 9f12a097ccdb0b64ef86b9dca486f29a948a04aa Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 4 Sep 2020 17:39:30 +0530 Subject: [PATCH] Update Economist --- recipes/economist_free.recipe | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/recipes/economist_free.recipe b/recipes/economist_free.recipe index fd06c51c44..6d088bc51b 100644 --- a/recipes/economist_free.recipe +++ b/recipes/economist_free.recipe @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python # License: GPLv3 Copyright: 2008, Kovid Goyal try: @@ -249,7 +249,8 @@ class Economist(BasicNewsRecipe): return ans def economist_parse_index(self, soup): - div = soup.find(attrs={'class': 'weekly-edition-header__image'}) + archive = self.index_to_soup("https://www.economist.com/weeklyedition/archive") + div = archive.find(attrs={'class': 'edition-teaser__image'}) if div is not None: img = div.find('img', srcset=True) self.cover_url = img['srcset'].split(',')[-1].split()[0]