問題:
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.我獲得了文件的 UID,較小的文件 (1.6MB) 下載正常,但是較大的文件 (3.7GB) 總是重定向到一個頁面,該頁面詢問我是否要在沒有病毒掃描的情況下繼續下載。 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.我注意到在鏈接的倒數第三行,有一個&confirm=JwkK
,它是一個隨機的 4 個字符的字符串,但建議有一種方法可以向我的 URL 添加確認。 One of the links I visited suggested &confirm=no_antivirus
but that's not working.我訪問的鏈接之一建議&confirm=no_antivirus
但這不起作用。
I hope someone here can help with this!我希望這裏有人可以幫助解決這個問題!
解決方案:
參考一: https://stackoom.com/question/1gwL3參考二: wget/curl large file from google drive