Update natgeomag.recipe

This commit is contained in:
unkn0w7n 2024-10-01 21:26:15 +05:30
parent 4755a6cd5f
commit 6b6403c7e2

View File

@ -208,6 +208,7 @@ class NatGeo(BasicNewsRecipe):
articles = ans.setdefault(section, [])
articles.append({'title': title, 'url': url})
for promo in soup.findAll(**classes('OneUpPromoCard__Content')):
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')))