wkentaro / gdown

Google Drive Public File Downloader when Curl/Wget Fails
MIT License
4.11k stars 343 forks source link

Add the support for the external user cookies #208

Closed kylincaster closed 1 year ago

kylincaster commented 1 year ago

The Google would probiden the anonymous download of large size file by too many user in a short periodic of time The error is given by

Too many users have viewed or downloaded this file recently. Please try accessing the file again later. If the file you are trying to access is particularly large or is shared with many people, it may take up to 24 hours to be able to view or download the file. If you still can't access a file after 24 hours, contact your domain administrator.

So, a user cookies file (obtained from the browser) is necessary, like the following file,

my_cookies.txt
{
    "__Secure-1PAPISID": "XXXXXXXX",
    "__Secure-1PSID": "XXXXXXX",        
    ...
    "SSID": "XXXXXXXXX"
 }
gdown https://drive.google.com/drive/folders/15uNXeRBIhVvZJIhL4yTw4IsStMhUaaxl --cookies=my_cookies.txt
wkentaro commented 1 year ago

By default, Gdown uses cookies stored in ~/.cache/gdown/cookies.json, so can you try editing that file to see if it still works without adding --cookies as a new argument.

NormTurtle commented 1 year ago

By default, Gdown uses cookies stored in ~/.cache/gdown/cookies.json, so can you try editing that file to see if it still works without adding --cookies as a new argument.

sir, i really appreciate this does exist, but im having some issues with ~/.cache dir , and it won't be fixed, due to machine owner , so please make arguemet as --cookies i really need it :)

wkentaro commented 1 year ago

With https://github.com/wkentaro/gdown/pull/239, --no-cookies won't save cookies file anymore, so this PR won't be necessary? Please request to reopen if not.