mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-05-01 03:44:07 +02:00
WSJ: Don't error out if a single section fails
This commit is contained in:
parent
bc82ea6103
commit
231aab9561
1 changed files with 7 additions and 4 deletions
|
|
@ -54,10 +54,13 @@ def wsj_get_index(self):
|
|||
|
||||
def wsj_add_feed(self,feeds,title,url):
|
||||
self.log('Found section:', title)
|
||||
if url.endswith('whatsnews'):
|
||||
articles = self.wsj_find_wn_articles(url)
|
||||
else:
|
||||
articles = self.wsj_find_articles(url)
|
||||
try:
|
||||
if url.endswith('whatsnews'):
|
||||
articles = self.wsj_find_wn_articles(url)
|
||||
else:
|
||||
articles = self.wsj_find_articles(url)
|
||||
except:
|
||||
articles = []
|
||||
if articles:
|
||||
feeds.append((title, articles))
|
||||
return feeds
|
||||
|
|
|
|||
Loading…
Reference in a new issue