src.prepare_data.task_download_data
¶
Module Contents¶
Functions¶
|
Check whether a download is necessary. |
|
Download url in |
|
Execute the correct download operation. |
|
Attributes¶
- _is_download_necessary(path, response)[source]¶
Check whether a download is necessary.
There three criteria.
If the file is missing, download it.
The following two checks depend on each other.
Some files have an entry in the header which specifies when the file was modified last. If the file has been modified, download it.
If the header has no entry for the last modified date, we compare file sizes. If the file sizes do not match, the file is downloaded.
- _downloader(file: pathlib.Path, url: str, response: int)[source]¶
Download url in
URLS[position]
to disk with possible resumption.