We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72fe5bb commit b09659aCopy full SHA for b09659a
src/download_data.py
@@ -1,5 +1,5 @@
1
import os
2
-from google.cloud import storage
+import urllib.request
3
import argparse
4
5
def load_data(path, key):
@@ -9,10 +9,8 @@ def load_data(path, key):
9
os.makedirs(path)
10
11
if not os.path.exists(os.path.join(path, key)):
12
- client = storage.Client.create_anonymous_client()
13
- bucket = client.bucket(bucket_name=gcsBucket, user_project=None)
14
- blob = storage.Blob(key, bucket)
15
- blob.download_to_filename(filename=os.path.join(path, key), client=client)
+ url = "https://storage.googleapis.com/%s/%s" % (gcsBucket, key)
+ urllib.request.urlretrieve(url, os.path.join(path, key))
16
17
18
def main():
0 commit comments