mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-08-07 09:01:38 -04:00
Update natgeomag.recipe
This commit is contained in:
parent
4755a6cd5f
commit
6b6403c7e2
@ -208,6 +208,7 @@ class NatGeo(BasicNewsRecipe):
|
|||||||
articles = ans.setdefault(section, [])
|
articles = ans.setdefault(section, [])
|
||||||
articles.append({'title': title, 'url': url})
|
articles.append({'title': title, 'url': url})
|
||||||
for promo in soup.findAll(**classes('OneUpPromoCard__Content')):
|
for promo in soup.findAll(**classes('OneUpPromoCard__Content')):
|
||||||
|
if promo.find('a', attrs={'href': True}):
|
||||||
url = promo.a['href']
|
url = promo.a['href']
|
||||||
section = self.tag_to_string(promo.find(**classes('SectionLabel')))
|
section = self.tag_to_string(promo.find(**classes('SectionLabel')))
|
||||||
title = self.tag_to_string(promo.find(**classes('Card__Content__Heading')))
|
title = self.tag_to_string(promo.find(**classes('Card__Content__Heading')))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user