|
@ -17,7 +17,9 @@ class EEDownload(): |
|
|
directory = os.path.dirname(filename) |
|
|
directory = os.path.dirname(filename) |
|
|
if not os.path.exists(directory): |
|
|
if not os.path.exists(directory): |
|
|
os.makedirs(directory) |
|
|
os.makedirs(directory) |
|
|
|
|
|
print("Downloading "+os.path.basename(url)) |
|
|
urllib.request.urlretrieve(url, filename) |
|
|
urllib.request.urlretrieve(url, filename) |
|
|
|
|
|
print("Done") |
|
|
return True |
|
|
return True |
|
|
except urllib.error.URLError as e: |
|
|
except urllib.error.URLError as e: |
|
|
print("Unable to donwload file, [{err}]" |
|
|
print("Unable to donwload file, [{err}]" |
|
|