Browse Source

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
master
JustAnotherArchivist 4 years ago
parent
commit
195df08cd5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      s3-bucket-list

+ 1
- 1
s3-bucket-list View File

@@ -82,7 +82,7 @@ while True:
assert contents[-1].endswith(b'</Contents></ListBucketResult>')
contents[-1] = contents[-1][:-len('</ListBucketResult>')]
for content in contents[1:]:
key = content[5 : content.index(b'</Key>')].decode('utf-8') # 5 = len(b'<Key>')
key = html.unescape(content[5 : content.index(b'</Key>')].decode('utf-8')) # 5 = len(b'<Key>')
url = f'{baseUrl}{urllib.parse.quote(key)}'

tags = content.split(b'>')


Loading…
Cancel
Save