Skip to content

Commit

Permalink
URL encode paths for S3 download
Browse files Browse the repository at this point in the history
  • Loading branch information
Lfulcrum committed Jan 11, 2023
1 parent a0e638c commit b4e0a13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scripts/download_test_data.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/env python3

import xml.etree.ElementTree as ET
import urllib.parse as urlparse
import urllib.request as urlrequest
from pathlib import Path
import shutil
Expand Down Expand Up @@ -57,7 +58,7 @@ def fetch_index(continuation_token = None) -> Tuple[List[str], Optional[Any]]:


def download_file(path: str):
url = BUCKET_URL + "/" + path
url = BUCKET_URL + "/" + urlparse.quote_plus(path)

# Note: '/' operator joins paths
dest = OUTPUT_DIR / path
Expand Down

0 comments on commit b4e0a13

Please sign in to comment.