简体   繁体   English

使用 Python 从 Google Drive 下载文件

[英]Download Files From Google Drive Using Python

I want to download file from google drive directly using python.我想直接使用 python 从谷歌驱动器下载文件。 I had tried many module's like pydrive, google drive API, gdown, googledrivefiledownloader and many more but it always throw me error.我尝试过许多模块,如 pydrive、google drive API、gdown、googledrivefiledownloader 等等,但它总是让我出错。 When i use gdown module to download any type of file it's work perfectly but when i open that downloaded file it's show file is not supported.当我使用 gdown 模块下载任何类型的文件时,它工作得很好,但是当我打开下载的文件时,它的显示文件不受支持。

I had tried this code as following我试过这个代码如下

This is following code and output这是以下代码和输出

Try this code:-试试这个代码: -

from zdrive import Downloader

output_directory = "/home/abhinav/Documents"
d = Downloader()

# folder which want to download from Drive
folder_id = 'XXXX-YYYY-ZZZZ'
d.downloadFolder(folder_id, destinationFolder=output_directory)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Python:使用 url 从谷歌驱动器下载文件 - Python: download files from google drive using url 使用 Python 将 Google Drive 文件下载到特定位置 - Download Google Drive files to a specific location using Python Python - 作为计划任务从 Google Drive 下载文件 - Python - Download files from Google Drive as a scheduled task Python:从谷歌驱动器中查找并下载丢失的文件(使用共享链接) - Python: find and download missing files from google drive (using a sharable link) 如何使用 python 以编程方式从谷歌驱动器下载特定文件 - How can I download specific files from google drive programmatically using python 如何使用 python 从 Google 云端硬盘仅下载不在您计算机中的文件 - How to download only files that are not in your computer from Google Drive using python 如何使用 For Loop 通过 API 从 Google Drive 下载文件 - How to download files from Google Drive using For Loop through API 使用 Python 从 Google Drive 下载文件名 - Download a file with JUST the filename from Google Drive using Python Google Drive API:如何从Google Drive下载文件? - Google Drive API:How to download files from google drive? 从谷歌共享驱动器下载文件 - Download files from the google shared drive
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM