1
0
Fork 0
mirror of synced 2024-06-26 10:00:19 +12:00

fix archive url calculation for urls ending in slash

This commit is contained in:
Nick Sweeting 2017-07-04 04:09:00 -05:00
parent 747676dddd
commit f0c7a6f558

View file

@ -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"""