From 6a082bb1c5096706c1646cdeb0b508dec65d4687 Mon Sep 17 00:00:00 2001 From: unkn0w7n <51942695+unkn0w7n@users.noreply.github.com> Date: Tue, 1 Oct 2024 22:45:02 +0530 Subject: [PATCH] ... --- recipes/natgeomag.recipe | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/natgeomag.recipe b/recipes/natgeomag.recipe index a009f653d030..f13e891493ea 100644 --- a/recipes/natgeomag.recipe +++ b/recipes/natgeomag.recipe @@ -208,7 +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}): + if promo.find('a', attrs={'href': True}) and promo.a.get('href'): url = promo.a['href'] section = self.tag_to_string(promo.find(**classes('SectionLabel'))) title = self.tag_to_string(promo.find(**classes('Card__Content__Heading')))