mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-31 14:33:54 -04:00
Merge branch 'master' of https://github.com/unkn0w7n/calibre
This commit is contained in:
commit
e9bb51dd4c
@ -38,8 +38,9 @@ class ForeignPolicy(BasicNewsRecipe):
|
|||||||
|
|
||||||
def parse_index(self):
|
def parse_index(self):
|
||||||
soup = self.index_to_soup('https://foreignpolicy.com/the-magazine')
|
soup = self.index_to_soup('https://foreignpolicy.com/the-magazine')
|
||||||
img = soup.find('img', attrs={'data-lazy-src': lambda x: x and '-cover' in x})
|
img = soup.find('img', attrs={'src': lambda x: x and '-cover' in x})
|
||||||
self.cover_url = img['data-lazy-src']
|
if img:
|
||||||
|
self.cover_url = img['src']
|
||||||
current_section = None
|
current_section = None
|
||||||
amap = OrderedDict()
|
amap = OrderedDict()
|
||||||
for x in soup.findAll(name=('h2', 'h3')):
|
for x in soup.findAll(name=('h2', 'h3')):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user