mirror of
https://github.com/ArchiveBox/ArchiveBox
synced 2024-11-29 23:50:22 +00:00
fix archive_org KeyError when running with it disabled
This commit is contained in:
parent
e84a9a86e6
commit
08591e8fbb
1 changed files with 2 additions and 2 deletions
4
index.py
4
index.py
|
@ -138,8 +138,8 @@ def write_html_link_index(out_dir, link):
|
||||||
'tags': link['tags'] or 'untagged',
|
'tags': link['tags'] or 'untagged',
|
||||||
'bookmarked': datetime.fromtimestamp(float(link['timestamp'])).strftime('%Y-%m-%d %H:%M'),
|
'bookmarked': datetime.fromtimestamp(float(link['timestamp'])).strftime('%Y-%m-%d %H:%M'),
|
||||||
'updated': datetime.fromtimestamp(float(link['updated'])).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']),
|
'archive_org': link['latest'].get('archive_org') or 'https://web.archive.org/save/{}'.format(link['url']),
|
||||||
'wget': link['latest']['wget'] or link['domain'],
|
'wget': link['latest'].get('wget') or link['domain'],
|
||||||
}))
|
}))
|
||||||
|
|
||||||
chmod_file(path)
|
chmod_file(path)
|
||||||
|
|
Loading…
Reference in a new issue