Fix #1817828 [Economist Magazine download not working](https://bugs.launchpad.net/calibre/+bug/1817828)

This commit is contained in:
Kovid Goyal 2019-02-27 11:25:56 +05:30
parent 7fd2cb4893
commit 494140ecc1
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 12 additions and 12 deletions

View File

@ -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(

View File

@ -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(