wget/curl 来自谷歌驱动器的大文件 [英] wget/curl large file from google drive
问题描述
我正在尝试通过脚本从 google 驱动器下载文件,但在执行此操作时遇到了一些问题.我要下载的文件是
我注意到在链接的倒数第三行,有一个 &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屋!