diff --git a/recipes/newsweek.recipe b/recipes/newsweek.recipe index 44935102f1..09c3955b24 100644 --- a/recipes/newsweek.recipe +++ b/recipes/newsweek.recipe @@ -75,7 +75,10 @@ class Newsweek(BasicNewsRecipe): sections = defaultdict(list) for block in ('magazine-magazine-issue-story-list', 'editors-pick'): div = root.xpath( - '//div[@id="block-nw-{}"]'.format(block))[0] + '//div[@id="block-nw-{}"]'.format(block)) + if not div: + continue + div = div[0] for a in div.xpath(href_xpath): title = self.tag_to_string(a) article = a.xpath('ancestor::article')[0]