lair.records.wget_download#

lair.records.wget_download(urls, download_dir, prefix=None, num_threads=1, unzip=True)[source]#

Download multiple files from given URLs using wget and extract them if they are ZIP files.

Parameters:
  • urls (str | list[str]) – List of URLs to download.

  • download_dir (str) – The local directory to download files to.

  • prefix (str, optional) – The common prefix to use for the local directory structure. Defaults to None. If None, the files will be downloaded directly into the download_dir. If an empty string, the entire structure will be recreated.

  • num_threads (int, optional) – Maximum number of threads to use for downloading, by default 4.

  • unzip (bool, optional) – Whether to unzip the downloaded files if they are ZIP files. Defaults to True.