Also ignore download failures for sections

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

View File

@ -258,9 +258,9 @@ class NewYorkTimes(BasicNewsRecipe):
feeds = [] feeds = []
for section_title, slug in web_sections: for section_title, slug in web_sections:
query_id = '/section/' + slug query_id = '/section/' + slug
data = self.nyt_graphql_query(query_id)
self.log('Section:', section_title)
try: try:
data = self.nyt_graphql_query(query_id)
self.log('Section:', section_title)
articles = parse_web_section(data, log=self.log, title=section_title) articles = parse_web_section(data, log=self.log, title=section_title)
except Exception as e: except Exception as e:
self.log('Failed to parse section:', section_title, 'with error:', e) self.log('Failed to parse section:', section_title, 'with error:', e)

View File

@ -258,9 +258,9 @@ class NewYorkTimes(BasicNewsRecipe):
feeds = [] feeds = []
for section_title, slug in web_sections: for section_title, slug in web_sections:
query_id = '/section/' + slug query_id = '/section/' + slug
data = self.nyt_graphql_query(query_id)
self.log('Section:', section_title)
try: try:
data = self.nyt_graphql_query(query_id)
self.log('Section:', section_title)
articles = parse_web_section(data, log=self.log, title=section_title) articles = parse_web_section(data, log=self.log, title=section_title)
except Exception as e: except Exception as e:
self.log('Failed to parse section:', section_title, 'with error:', e) self.log('Failed to parse section:', section_title, 'with error:', e)