【发布时间】:2020-07-03 15:40:21
【问题描述】:
我目前正在尝试使用 PyDrive 从 Google Drive 下载文件,但只能将文件下载到与我的 Python 程序相同的位置。有没有办法指定文件的下载位置?这就是我目前下载文件的方式。
if file1['title'] == file_name:
file2 = drive.CreateFile({'id': file1['id']})
print('Downloading file %s from Google Drive' % file2['title'])
file2.GetContentFile(file_name) # Save Drive file as a local file
【问题讨论】: