This commit is contained in:
Glenn Jocher 2020-02-27 12:49:01 -08:00
parent f3d3295f90
commit de3e539609
1 changed files with 1 additions and 1 deletions

View File

@ -24,7 +24,7 @@ def gdrive_download(id='1HaXkef9z6y5l4vUnCYgdmEAj61c6bfWO', name='coco.zip'):
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 -s \"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 -f -L -o %s https://drive.google.com/uc?export=download&id=%s' % (name, id) s = "curl -f -L -o %s 'https://drive.google.com/uc?export=download&id=%s'" % (name, id)
r = os.system(s) # execute, capture return values r = os.system(s) # execute, capture return values
os.remove('cookie') if os.path.exists('cookie') else None os.remove('cookie') if os.path.exists('cookie') else None