mirror of
https://github.com/sys-nyx/red-arch.git
synced 2025-05-06 08:45:31 -04:00
resolve missing key error in write_html load_links, issue #23
This commit is contained in:
parent
0f96e04083
commit
5fd67603e5
1 changed files with 1 additions and 1 deletions
|
@ -620,7 +620,7 @@ def load_links(date, subreddit, with_comments=False):
|
||||||
with open(daily_links_path, 'r', encoding='utf-8') as links_file:
|
with open(daily_links_path, 'r', encoding='utf-8') as links_file:
|
||||||
reader = csv.DictReader(links_file)
|
reader = csv.DictReader(links_file)
|
||||||
for link_row in reader:
|
for link_row in reader:
|
||||||
if with_comments:
|
if with_comments and 'id' in link_row.keys():
|
||||||
comments = []
|
comments = []
|
||||||
comments_file_path = daily_path + '/' + link_row['id'] + '.csv'
|
comments_file_path = daily_path + '/' + link_row['id'] + '.csv'
|
||||||
if os.path.isfile(comments_file_path):
|
if os.path.isfile(comments_file_path):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue