Fix Newsweek

This commit is contained in:
Kovid Goyal 2011-06-04 14:14:20 -06:00
parent 69580f80ab
commit c6733399f7

View File

@ -69,7 +69,11 @@ class Newsweek(BasicNewsRecipe):
for section, shref in self.newsweek_sections(): for section, shref in self.newsweek_sections():
self.log('Processing section', section, shref) self.log('Processing section', section, shref)
articles = [] 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') na = soups[0].find('a', rel='next')
if na: if na:
soups.append(self.index_to_soup(self.BASE_URL+na['href'])) soups.append(self.index_to_soup(self.BASE_URL+na['href']))