erickutcher / httpdownloader

HTTP(S) download manager that uses input/output completion ports (IOCP).
https://erickutcher.github.io/#HTTP_Downloader
558 stars 62 forks source link

Drive Zipping Download does not work #205

Closed FeyrisTan closed 2 years ago

FeyrisTan commented 2 years ago

When zipping a file on drive.google.com to download http downloader reports the wrong size and the downloaded file gets corrupted. this is pretty much my only hurdle right now. i do not like idm or any other download manager.

erickutcher commented 2 years ago

It's a cookie issue. I assume you're using one of the extensions? It's not getting the cookies that are associated with the file and ends up downloading a Google Drive page instead. I'll have to work on the extensions to get this fixed. The workaround is to manually add the cookies into the Add URL(s) window.

erickutcher commented 2 years ago

I've noticed this is happening with Firefox, but not Vivaldi or Edge.

erickutcher commented 2 years ago

Firefox's private browsing mode will prevent cross-site cookies from being accessed by the extension. There's nothing I can do to get around that because it's a setting that's enforced by Firefox and they haven't implemented any WebExtension APIs to deal with it. You'll want to fiddle around with the Enhanced Tracking Protection settings in Firefox to get things to work.

RationalFragile commented 1 year ago

Can you please explain further? For me, on Chrome, google drive downloads fail (400), but I do have the cookies set ("AUTH_xxxxxxxxxxxxxxxxxxxxxxx=0000000000000000|0000000000000|xxxxxxxxxxxxxxxxxxxxxxxxxxx") which is the same cookie that I see if I open devtools on the last request in the network tab when the download starts. (I noticed that chrome shows things like ":Path: /some/long/path" in the request headers, and after googling, it seems these are HTTP/2 pseudo-headers that apply to requests and responses within an HTTP/2 stream. Could that be the issue?) Thank you.

smaragdus commented 1 year ago

Almost off-topic, there is a web service- Direct link Generator, which converts links of some file sharing services into direct links (Dropbox, Google Drive and OneDrive are supported). I have not tested this link converter becsuse I do not use any of these services and I don't have test links. I suppose someone might find this link generator useful.

RationalFragile commented 1 year ago

@smaragdus thank you, but I tried and it didn't work because I know the issue is not that, and I actually found out why.

After some debugging and testing, (it worked on Firefox but not in Chrome, so I compared everything: url, cookies, headers, etc) and found that you MUST unselect "Send POST Data" in the POST tab. For some reason, it's checked by default on google drive downloads. So just right-click > update download > uncheck post and restart and it will download.