WSJ: Don't error out if a single section fails

This commit is contained in:
Kovid Goyal 2010-09-20 09:37:15 -06:00
parent bc82ea6103
commit 231aab9561

View File

@ -54,10 +54,13 @@ class WallStreetJournal(BasicNewsRecipe):
def wsj_add_feed(self,feeds,title,url): def wsj_add_feed(self,feeds,title,url):
self.log('Found section:', title) self.log('Found section:', title)
try:
if url.endswith('whatsnews'): if url.endswith('whatsnews'):
articles = self.wsj_find_wn_articles(url) articles = self.wsj_find_wn_articles(url)
else: else:
articles = self.wsj_find_articles(url) articles = self.wsj_find_articles(url)
except:
articles = []
if articles: if articles:
feeds.append((title, articles)) feeds.append((title, articles))
return feeds return feeds