python - 获取公共(public) Google 文档文件的下载链接

标签 python api google-docs

阅读Google Docs API我发现这个:

Downloading

Files cannot be downloaded in a format other than the one in which they were originally uploaded. The download URL for files looks something like this:

https://doc-04-20-docs.googleusercontent.com/docs/secure/m7an0emtau/WJm12345/YzI2Y2ExYWVm?h=16655626&e=download&gd=true

假设有一个公开的 Google 文档文件 URL,

https://docs.google.com/open?id=0B1-vl-dPgKm_NTNhZjZkMWMtZjQxOS00MGE1LTg2MjItNGVjYzdmZjYxNmQ5

如何将其变成下载链接?

最佳答案

嗨 nightcracker 试试这个:

https://docs.google.com/uc?export=download&id=DOCIDGOESHERE

我只用一个 pdf 试过它,它工作正常,所以也许玩一下它会有所帮助....

祝一切顺利

戴夫

关于python - 获取公共(public) Google 文档文件的下载链接,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9045392/

相关文章:

python - 如何在窗口坐标内插入一个带有数字的圆圈?

api - Google Maps API 上的雷达图像

google-apps-script - 如何获取表格宽度

iOS POST 到 Google 表单(电子表格)

android - Google Sign-In for Android 中的问题

Python:反转字符串

python - 基数为 10 : '[' when doing a filter with request. 主体的文字 int() 无效

python - 正则表达式仅在字符串开头替换匹配项

java - 使用 Java Kubernetes 客户端 Api 部署 Pod

node.js - 当 graphQL 的查询从 mongodb 返回空数据时,你应该检查什么?