This commit is contained in:
Kovid Goyal 2025-04-10 19:22:31 +05:30
parent c5f9dcb6c6
commit bc3255573a
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 10 additions and 2 deletions

View File

@ -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:

View File

@ -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: