Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Oct 1, 2024
2 parents 4755a6c + 6b6403c commit f5fd9f8
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions recipes/natgeomag.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,12 @@ class NatGeo(BasicNewsRecipe):
articles = ans.setdefault(section, [])
articles.append({'title': title, 'url': url})
for promo in soup.findAll(**classes('OneUpPromoCard__Content')):
url = promo.a['href']
section = self.tag_to_string(promo.find(**classes('SectionLabel')))
title = self.tag_to_string(promo.find(**classes('Card__Content__Heading')))
articles = ans.setdefault(section, [])
articles.append({'title': title, 'url': url})
if promo.find('a', attrs={'href': True}):
url = promo.a['href']
section = self.tag_to_string(promo.find(**classes('SectionLabel')))
title = self.tag_to_string(promo.find(**classes('Card__Content__Heading')))
articles = ans.setdefault(section, [])
articles.append({'title': title, 'url': url})
for gird in soup.findAll(attrs={'class':'GridPromoTile'}):
for article in soup.findAll('article'):
a = article.find('a')
Expand Down

0 comments on commit f5fd9f8

Please sign in to comment.