From 494140ecc1ff43825d65f559a2e142d9cbe2688d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Wed, 27 Feb 2019 11:25:56 +0530 Subject: [PATCH] Fix #1817828 [Economist Magazine download not working](https://bugs.launchpad.net/calibre/+bug/1817828) --- recipes/economist.recipe | 12 ++++++------ recipes/economist_free.recipe | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/recipes/economist.recipe b/recipes/economist.recipe index 0d347f5fcf..53cd62d2b0 100644 --- a/recipes/economist.recipe +++ b/recipes/economist.recipe @@ -167,12 +167,12 @@ class Economist(BasicNewsRecipe): # with open('/t/raw.html', 'wb') as f: # f.write(raw) soup = self.index_to_soup(raw) - nav = soup.find(attrs={'class':'navigation__wrapper'}) - if nav is not None: - a = nav.find('a', href=lambda x: x and '/printedition/' in x) - if a is not None: - self.log('Following nav link to current edition', a['href']) - soup = self.index_to_soup(process_url(a['href'])) + # nav = soup.find(attrs={'class':'navigation__wrapper'}) + # if nav is not None: + # a = nav.find('a', href=lambda x: x and '/printedition/' in x) + # if a is not None: + # self.log('Following nav link to current edition', a['href']) + # soup = self.index_to_soup(process_url(a['href'])) ans = self.economist_parse_index(soup) if not ans: raise NoArticles( diff --git a/recipes/economist_free.recipe b/recipes/economist_free.recipe index 0d347f5fcf..53cd62d2b0 100644 --- a/recipes/economist_free.recipe +++ b/recipes/economist_free.recipe @@ -167,12 +167,12 @@ class Economist(BasicNewsRecipe): # with open('/t/raw.html', 'wb') as f: # f.write(raw) soup = self.index_to_soup(raw) - nav = soup.find(attrs={'class':'navigation__wrapper'}) - if nav is not None: - a = nav.find('a', href=lambda x: x and '/printedition/' in x) - if a is not None: - self.log('Following nav link to current edition', a['href']) - soup = self.index_to_soup(process_url(a['href'])) + # nav = soup.find(attrs={'class':'navigation__wrapper'}) + # if nav is not None: + # a = nav.find('a', href=lambda x: x and '/printedition/' in x) + # if a is not None: + # self.log('Following nav link to current edition', a['href']) + # soup = self.index_to_soup(process_url(a['href'])) ans = self.economist_parse_index(soup) if not ans: raise NoArticles(