This commit is contained in:
Glenn Jocher 2020-02-27 13:00:00 -08:00
parent 6a99e39bd5
commit 3a1ca6454c
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ def gdrive_download(id='1HaXkef9z6y5l4vUnCYgdmEAj61c6bfWO', name='coco.zip'):
# Attempt file download # Attempt file download
os.system("curl -c ./cookie -s -L \"https://drive.google.com/uc?export=download&id=%s\" > /dev/null" % id) os.system("curl -c ./cookie -s -L \"https://drive.google.com/uc?export=download&id=%s\" > /dev/null" % id)
if os.path.exists('cookie'): # large file if os.path.exists('cookie'): # large file
s = "curl -Lb ./cookie -s \"https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=%s\" -o %s" % ( s = "curl -Lb ./cookie \"https://drive.google.com/uc?export=download&confirm=`awk '/download/ {print $NF}' ./cookie`&id=%s\" -o %s" % (
id, name) id, name)
else: # small file else: # small file
s = "curl -s -L -o %s 'https://drive.google.com/uc?export=download&id=%s'" % (name, id) s = "curl -s -L -o %s 'https://drive.google.com/uc?export=download&id=%s'" % (name, id)