【发布时间】:2016-05-27 12:11:56
【问题描述】:
我正在尝试将 .doc 文件作为 html 从 Google Drive 导出到。这是我的代码。我在文档中没有看到有关如何将文档下载为 html 的任何内容。但这是我的代码与示例相去甚远。我不确定docsfile 指的是什么。
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
gauth = GoogleAuth()
gauth.LocalWebserverAuth()
drive = GoogleDrive(gauth)
test='https://docs.google.com/document/d/116rpW5DxfVDFTfJeCh3pFl9K8gtuZV5gX035631SKjm8/edit'
docsfile.GetContentFile(test, mimetype='text/html')
【问题讨论】:
-
这是你的全部代码吗?如果在没有指定
docsfile是什么的情况下运行,我会感到惊讶。 -
这是作为示例发布的内容。它显然没有运行。这是链接github.com/googledrive/PyDrive