Skip to content

Commit

Permalink
Update download script
Browse files Browse the repository at this point in the history
  • Loading branch information
fontanf committed Apr 15, 2024
1 parent 2671088 commit 5605faa
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions scripts/download_data.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
import gdown
import os
import pathlib
import time


def download(id):
gdown.download(id=id, output="data.7z")
os.system("7z x data.7z -odata")
pathlib.Path("data.7z").unlink()
for _ in range(3):
try:
gdown.download(id=id, output="data.7z")
os.system("7z x data.7z -odata")
pathlib.Path("data.7z").unlink()
except:
time.sleep(10)
continue
return
sys.exit(1)


download("1_sbLgEoWCFo4gEsg9BE8eG4De4f8fkF0")
Expand Down

0 comments on commit 5605faa

Please sign in to comment.