mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Add a retry for WSJ articles
This commit is contained in:
parent
ccc4a17060
commit
4a5dcef805
@ -201,6 +201,9 @@ class WSJ(BasicNewsRecipe):
|
|||||||
self.log('Found section:', title, '[' + url + ']')
|
self.log('Found section:', title, '[' + url + ']')
|
||||||
try:
|
try:
|
||||||
articles = self.wsj_find_articles(url)
|
articles = self.wsj_find_articles(url)
|
||||||
|
if not articles:
|
||||||
|
# retry once, sometimes these pages come up empty
|
||||||
|
articles = self.wsj_find_articles(url)
|
||||||
except Exception:
|
except Exception:
|
||||||
self.log.exception('Failed to parse section:', title)
|
self.log.exception('Failed to parse section:', title)
|
||||||
articles = []
|
articles = []
|
||||||
|
@ -201,6 +201,9 @@ class WSJ(BasicNewsRecipe):
|
|||||||
self.log('Found section:', title, '[' + url + ']')
|
self.log('Found section:', title, '[' + url + ']')
|
||||||
try:
|
try:
|
||||||
articles = self.wsj_find_articles(url)
|
articles = self.wsj_find_articles(url)
|
||||||
|
if not articles:
|
||||||
|
# retry once, sometimes these pages come up empty
|
||||||
|
articles = self.wsj_find_articles(url)
|
||||||
except Exception:
|
except Exception:
|
||||||
self.log.exception('Failed to parse section:', title)
|
self.log.exception('Failed to parse section:', title)
|
||||||
articles = []
|
articles = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user