From 195df08cd5de49b1c8fe4be9954f1d4fc5057283 Mon Sep 17 00:00:00 2001 From: JustAnotherArchivist Date: Tue, 3 Dec 2019 04:48:21 +0000 Subject: [PATCH] Fix marker loop on some filenames due to lacking HTML entity processing E.g. https://audio-market-dev.s3.amazonaws.com/?marker=media/23/Hard%20Style%20Producer --- s3-bucket-list | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/s3-bucket-list b/s3-bucket-list index a5c03a5..cd535e3 100755 --- a/s3-bucket-list +++ b/s3-bucket-list @@ -82,7 +82,7 @@ while True: assert contents[-1].endswith(b'') contents[-1] = contents[-1][:-len('')] for content in contents[1:]: - key = content[5 : content.index(b'')].decode('utf-8') # 5 = len(b'') + key = html.unescape(content[5 : content.index(b'')].decode('utf-8')) # 5 = len(b'') url = f'{baseUrl}{urllib.parse.quote(key)}' tags = content.split(b'>')