From c6733399f796c3a5f10d8ca5f7bff44f25d521f9 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 4 Jun 2011 14:14:20 -0600 Subject: [PATCH] Fix Newsweek --- recipes/newsweek.recipe | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/recipes/newsweek.recipe b/recipes/newsweek.recipe index a31706e257..0cae4275b0 100644 --- a/recipes/newsweek.recipe +++ b/recipes/newsweek.recipe @@ -69,7 +69,11 @@ class Newsweek(BasicNewsRecipe): for section, shref in self.newsweek_sections(): self.log('Processing section', section, shref) articles = [] - soups = [self.index_to_soup(shref)] + try: + soups = [self.index_to_soup(shref)] + except: + self.log.warn('Section %s not found, skipping'%section) + continue na = soups[0].find('a', rel='next') if na: soups.append(self.index_to_soup(self.BASE_URL+na['href']))