From 3c9649b8066aed0c7e8b1a405b47991b06c9cee4 Mon Sep 17 00:00:00 2001 From: Hirotaka Aoki <113173839+aoki-h-jp@users.noreply.github.com> Date: Fri, 1 Sep 2023 23:16:03 +0900 Subject: [PATCH] add download_list --- bybit_bulk_downloader/downloader.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bybit_bulk_downloader/downloader.py b/bybit_bulk_downloader/downloader.py index 3d78c24..d6a2fc1 100644 --- a/bybit_bulk_downloader/downloader.py +++ b/bybit_bulk_downloader/downloader.py @@ -26,6 +26,7 @@ def __init__(self, destination_dir=".", data_type="trading"): """ self._destination_dir = destination_dir self._data_type = data_type + self.downloaded_list = [] def _get_url_from_bybit(self): """ @@ -80,6 +81,7 @@ def _download(self, url): parts = url.split("/") parts.insert(3, "bybit_data") prefix = "/".join(parts[prefix_start:prefix_end]) + self.downloaded_list.append(prefix) # Download the file filepath = os.path.join( @@ -120,3 +122,4 @@ def run_download(self): ): with ThreadPoolExecutor() as executor: executor.map(self._download, prefix_chunk) + self.downloaded_list.extend(prefix_chunk)