mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
c5f9dcb6c6
commit
bc3255573a
@ -260,7 +260,11 @@ class NewYorkTimes(BasicNewsRecipe):
|
||||
query_id = '/section/' + slug
|
||||
data = self.nyt_graphql_query(query_id)
|
||||
self.log('Section:', section_title)
|
||||
articles = parse_web_section(data, log=self.log, title=section_title)
|
||||
try:
|
||||
articles = parse_web_section(data, log=self.log, title=section_title)
|
||||
except Exception as e:
|
||||
self.log('Failed to parse section:', section_title, 'with error:', e)
|
||||
articles = []
|
||||
if articles:
|
||||
feeds.append((section_title, articles))
|
||||
else:
|
||||
|
@ -260,7 +260,11 @@ class NewYorkTimes(BasicNewsRecipe):
|
||||
query_id = '/section/' + slug
|
||||
data = self.nyt_graphql_query(query_id)
|
||||
self.log('Section:', section_title)
|
||||
articles = parse_web_section(data, log=self.log, title=section_title)
|
||||
try:
|
||||
articles = parse_web_section(data, log=self.log, title=section_title)
|
||||
except Exception as e:
|
||||
self.log('Failed to parse section:', section_title, 'with error:', e)
|
||||
articles = []
|
||||
if articles:
|
||||
feeds.append((section_title, articles))
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user