wkentaro / gdown

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

Gdown fail when downloading a lot of files... #182

Closed botkillern closed 2 years ago

botkillern commented 2 years ago

I'm using "gdown" to download 700 files, but after sometime, "gdown" still downloading the file with failing... I'm writing a log file and getting "403" error.

urllib3.connectionpool DEBUG https://doc-0c-60-docs.googleusercontent.com:443 "GET /docs/securesc/ha0ro937gcuc7l7deffksulhg5h7mbp1/sbe24qem3pbp0ok09d3p3jud34r78gdo/1655400600000/03896324383948142479/*/1IgH_8zRxyT43o0SeQPBCcKadssad5737aakOZ8WnZH?e=download HTTP/1.1" 403 1103

Can I use some "try/except" or something to get the response code ?

I think google are blocking my downloads, because when I try to download again the same file that failed befora, work well, but after certain time, this error back again. So if i can check the response code, I can do some tricky to wait or try again...

wkentaro commented 2 years ago

Do you use gdown.download? If so it returns None when it encounters some errors e.g., https://github.com/wkentaro/gdown/blob/1bf9e20442a0df57eec3e75a15ef4115dbec9b2f/gdown/download.py#L168-L180