Skip to content
This repository was archived by the owner on Nov 13, 2024. It is now read-only.

Commit d1ce012

Browse files
committed
fix nytimes errors
1 parent 0233776 commit d1ce012

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

extra_functions.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ def get_nytimes_news_headlines():
4646
"title": entry['title'],
4747
"summary": entry['summary'],
4848
"time_published": entry['published'],
49-
"tags": [i['term'] for i in entry['tags']],
49+
"tags": [i['term'] for i in entry.get('tags', [])],
5050
})
5151

5252
return news_list

0 commit comments

Comments
 (0)