这是可共享的链接link to file
ID = 1wzCjl51u131v1KBgpbiKLJs8DPPakhXCFosfYjp7BY0
所以manage downloads文件。
file_id = '11wzCjl51u131v1KBgpbiKLJs8DPPakhXCFosfYjp7BY0'
request = drive_service.files().export_media(fileId=file_id,
mimeType='application/pdf')
fh = io.BytesIO()
downloader = MediaIoBaseDownload(fh, request)
done = False
while done is False:
status, done = downloader.next_chunk()
print ("Download %d%%." % int(status.progress() * 100))
我将文件保存为dd.py,使用f5运行并出现此错误
第2行,在request = drive_service.files()。export_media(fileId = file_id,NameError:name'drive_service'未定义