来自谷歌驱动器的 wget/curl 大文件 [英] wget/curl large file from google drive

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

问题描述

我正在尝试使用脚本从谷歌驱动器下载文件,但这样做时遇到了一些麻烦.我要下载的文件在

我注意到在链接的倒数第三行,有一个 &confirm=JwkK,它是一个随机的 4 个字符的字符串,但建议有一种方法可以向我的 URL 添加确认.我访问的其中一个链接建议 &confirm=no_antivirus 但这不起作用.

我希望这里有人可以帮助解决这个问题!

解决方案

警告:此功能已弃用.请参阅下方评论中的警告.

<小时>

看看这个问题:直接从谷歌下载使用 Google Drive API 驱动

基本上你必须创建一个公共目录并通过相对引用来访问你的文件

wget https://googledrive.com/host/LARGEPUBLICFOLDERID/index4phlat.tar.gz

或者,您可以使用此脚本:https://github.com/circulosmeos/gdown.pl

I'm trying to download a file from google drive in a script, and I'm having a little trouble doing so. The files I'm trying to download are here.

I've looked online extensively and I finally managed to get one of them to download. I got the UIDs of the files and the smaller one (1.6MB) downloads fine, however the larger file (3.7GB) always redirects to a page which asks me whether I want to proceed with the download without a virus scan. Could someone help me get past that screen?

Here's how I got the first file working -

curl -L "https://docs.google.com/uc?export=download&id=0Bz-w5tutuZIYeDU0VDRFWG9IVUE" > phlat-1.0.tar.gz

When I run the same on the other file,

curl -L "https://docs.google.com/uc?export=download&id=0Bz-w5tutuZIYY3h5YlMzTjhnbGM" > index4phlat.tar.gz

I get the the following output -

I notice on the third-to-last line in the link, there a &confirm=JwkK which is a random 4 character string but suggests there's a way to add a confirmation to my URL. One of the links I visited suggested &confirm=no_antivirus but that's not working.

I hope someone here can help with this!

解决方案

WARNING: This functionality is deprecated. See warning below in comments.


Have a look at this question: Direct download from Google Drive using Google Drive API

Basically you have to create a public directory and access your files by relative reference with something like

wget https://googledrive.com/host/LARGEPUBLICFOLDERID/index4phlat.tar.gz

Alternatively, you can use this script: https://github.com/circulosmeos/gdown.pl

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

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