使用 wget 从谷歌驱动器下载文件 [英] Download a file from google drive using wget

查看:48
本文介绍了使用 wget 从谷歌驱动器下载文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将在这个地址可见的文件下载到一个 linux 远程:

I want to download the file that is viewable at this address to a linux remote:

https://drive.google.com/file/d/0Bz7KyqmuGsilT0J5dmRCM0ROVHc/view?usp=sharing

我希望我可以用 wget 做到这一点.

I'm hoping I can do this with wget.

我试过了

wget https://drive.google.com/file/d/0Bz7KyqmuGsilT0J5dmRCM0ROVHc/vgg16_weights.h5

响应是 404.

是否可以 wget 谷歌驱动器文件?如果是这样,提供的路径是什么?如果没有,是否有任何替代方案(bash 或其他),以便我可以避免将文件下载到本地并将其传输到远程?

Is it possible to wget a google drive file? If so, what is the path to provide? If not, are there any alternatives (bash or other) so I can avoid downloading the file to my local and transferring it to the remote?

推荐答案

将您的文件 ID 插入此 URL (https://drive.google.com/uc?export=download&id=),然后用引号将 URL 括起来,这样 Bash 就不会误解 &,如下所示:

Insert your file ID into this URL (https://drive.google.com/uc?export=download&id=), then surround the URL with quotes so that Bash doesn't misinterpret the &, like so:

wget "https://drive.google.com/uc?export=download&id=0Bz7KyqmuGsilT0J5dmRCM0ROVHc"

参考此处.

这篇关于使用 wget 从谷歌驱动器下载文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆