Skip to content

Commit

Permalink
Merge pull request #6 from aoki-h-jp/feature/1.0.2/add-download-list
Browse files Browse the repository at this point in the history
add download_list
  • Loading branch information
aoki-h-jp authored Sep 1, 2023
2 parents 6dc7836 + 3c9649b commit 9029cfd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bybit_bulk_downloader/downloader.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
"""
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -120,3 +122,4 @@ def run_download(self):
):
with ThreadPoolExecutor() as executor:
executor.map(self._download, prefix_chunk)
self.downloaded_list.extend(prefix_chunk)

0 comments on commit 9029cfd

Please sign in to comment.