Created
July 10, 2019 21:18
-
-
Save caioerick/3f1941abba4efcf35b2eb37fa9103ea6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
for i in range(1,2): | |
url_base = 'https://www.site.com/' | |
file = 'arquivo_{0:02d}.nc'.format(i) | |
url = url_base+file | |
print('Baixando {}...'.format(file)) | |
# O arquivo será baixado e salvo na mesma pasta | |
if(urllib.request.urlretrieve(url, 'directory/'+file)): | |
print("Ok") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment