From c8bb50c48b6f94fd85c25566d30e1805ab997ea0 Mon Sep 17 00:00:00 2001 From: Jose Gomez-Dans Date: Thu, 8 Sep 2016 09:11:12 +0100 Subject: [PATCH] Oooops, was saving all downloads to the same output file... Fixed now --- get_modis.py | 1 + 1 file changed, 1 insertion(+) diff --git a/get_modis.py b/get_modis.py index cd80098..76c221d 100755 --- a/get_modis.py +++ b/get_modis.py @@ -265,6 +265,7 @@ def get_modisfiles(username, password, platform, product, year, tile, proxy, if not r.ok: raise IOError("Can't start download... [%s]" % fname) file_size = int(r.headers['content-length']) + fname = the_url.split("/")[-1] LOG.info("Starting download on %s(%d bytes) ..." % (os.path.join(out_dir, fname), file_size)) with open(os.path.join(out_dir, fname), 'wb') as fp: