1
0
Fork 0
mirror of synced 2024-06-24 17:10:21 +12:00

fix archive_org KeyError when running with it disabled

This commit is contained in:
Nick Sweeting 2017-11-07 10:39:48 -05:00
parent e84a9a86e6
commit 08591e8fbb

View file

@ -138,8 +138,8 @@ def write_html_link_index(out_dir, link):
'tags': link['tags'] or 'untagged',
'bookmarked': datetime.fromtimestamp(float(link['timestamp'])).strftime('%Y-%m-%d %H:%M'),
'updated': datetime.fromtimestamp(float(link['updated'])).strftime('%Y-%m-%d %H:%M'),
'archive_org': link['latest']['archive_org'] or 'https://web.archive.org/save/{}'.format(link['url']),
'wget': link['latest']['wget'] or link['domain'],
'archive_org': link['latest'].get('archive_org') or 'https://web.archive.org/save/{}'.format(link['url']),
'wget': link['latest'].get('wget') or link['domain'],
}))
chmod_file(path)