Skip to content

Commit

Permalink
Reuters ignore missing sections
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Feb 5, 2021
1 parent a188064 commit 448d50a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion recipes/reuters.recipe
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,11 @@ class Reuters(BasicNewsRecipe):

def parse_reuters_section(self, base, slug):
url = 'https://' + base + '/' + slug
soup = self.index_to_soup(url)
try:
soup = self.index_to_soup(url)
except Exception:
self.log.error('Failed to load Reuters section:', url)
return
for div in soup.findAll(**classes('news-headline-list')):
h3 = div.find(**classes('story-title'))
a = h3.parent
Expand Down

0 comments on commit 448d50a

Please sign in to comment.