diff --git a/archive.py b/archive.py index 7038d772..da53aff1 100755 --- a/archive.py +++ b/archive.py @@ -338,11 +338,13 @@ def calculate_archive_url(link): return link['base_url'] else: # .html needs to be appended - url = split_url[0] if not split_url[0].endswith('/') else split_url[0][:-1] - without_scheme = url.split('://', 1)[-1] + without_scheme = split_url[0].split('://', 1)[-1] + if url.endswith('/'): + return '#'.join([without_scheme + 'index.html', *split_url[1:]]) return '#'.join([without_scheme + '.html', *split_url[1:]]) + def dump_index(links, service): """create index.html file for a given list of links and service"""