from parfive import Downloader
files = [
'https://idoc-regards-data.ias.u-psud.fr/SDO_DEM/2012/08/DEM_aia_2012-08-10T00_05.tar',
'https://idoc-regards-data.ias.u-psud.fr/SDO_DEM/2012/08/DEM_aia_2012-08-10T01_05.tar',
'https://idoc-regards-data.ias.u-psud.fr/SDO_DEM/2012/08/DEM_aia_2012-08-10T02_05.tar',
'https://idoc-regards-data.ias.u-psud.fr/SDO_DEM/2012/08/DEM_aia_2012-08-10T03_05.tar',
]
dl = Downloader(progress=False, overwrite=True)
print('With enqueue_file() and download():')
for f in files: dl.enqueue_file(f, path='result')
dl.download()
print('Done')
print('With simple_download():')
dl = Downloader(progress=False, overwrite=True)
dl.simple_download(files, path='result')
print('Done')
the resulting terminal output is
With enqueue_file() and download():
Done
With simple_download():
Files Downloaded: 100%|███████████████████████████████████████████████| 4/4 [00:00<00:00, 31.12file/s]
Done
Then:
enqueue_file() then download() takes progress=False and overwrite=True into account
a progress bar is shown at the second download, so progress=False is ignored by simple_download()
the download speed indicates that overwrite=True is also ignored by simple_download(); removing the files before the second download results in a much slower (and realistic) download speed
Expected behavior: progress=False and overwrite=True should not be ignored by simple_download()
Specifying overwrite=True in the call to simple_download() works, but the expectation is that overwrite from Downloader is inherited by default when calling simple_download() without specifying overwrite.
With the following code
the resulting terminal output is
Then:
enqueue_file()
thendownload()
takesprogress=False
andoverwrite=True
into accountprogress=False
is ignored bysimple_download()
overwrite=True
is also ignored bysimple_download()
; removing the files before the second download results in a much slower (and realistic) download speedExpected behavior:
progress=False
andoverwrite=True
should not be ignored bysimple_download()
Specifying
overwrite=True
in the call tosimple_download()
works, but the expectation is thatoverwrite
fromDownloader
is inherited by default when callingsimple_download()
without specifyingoverwrite
.