mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
fetch the economist cover from archive page
This commit is contained in:
parent
ce0cdf11c0
commit
0f148073fd
@ -249,7 +249,8 @@ class Economist(BasicNewsRecipe):
|
|||||||
return ans
|
return ans
|
||||||
|
|
||||||
def economist_parse_index(self, soup):
|
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:
|
if div is not None:
|
||||||
img = div.find('img', srcset=True)
|
img = div.find('img', srcset=True)
|
||||||
self.cover_url = img['srcset'].split(',')[-1].split()[0]
|
self.cover_url = img['srcset'].split(',')[-1].split()[0]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user