circulosmeos/gdown.pl

v1.2 doesn't work around the Virus Scan question of Gdrive it seems

kvegh opened this issue · 10 comments

kvegh commented

I have used v1.1 with success (thank you!), and that works still (just tested).

Now using v1.2 downloads a large .tar.gz file with the right size, but includes the HTML code at the beginning of the file with GDrive asking if you're okay with it that they can't viruscheck this file for its size.

The size is correct, the file content isn't.

If you need more information or testing, I'm at your service.

The problem is with the new continue download code. It uses the same temporary file for both the HTML pages it needs to read and the actual download file. Then it tries to continue from the amount of data already in the temporary file, so essentially, the first X number of bytes are replaced with the HTML of the prior pages, and you get a broken download.

The continue code needs some refactoring.

Thanks for reporting!
Yes, v1.2 is not running well with all URLs... now github doesn't show this change, until (if) I found a workaround... Maybe I'll revoke v1.2 entirely.

Please, test the new script here v2.0 with patched resume capabilities.
Post any problems here, thanks!

@circulosmeos All I get is an HTML page now. Here's a URL you can test with:

https://drive.google.com/open?id=1IroCuxpoug8tYL5Ss7gp92PJ1lFsqiqd

@JrMasterModelBuilder well, that URL also fails with v1.1 :-)
I've added these type of URLs to the script: try again!

Yep, works now. Nothing seems to happen when I specify an output file though (no wget output), to try to use the resume functionality.

./gdown.pl 'https://drive.google.com/open?id=1IroCuxpoug8tYL5Ss7gp92PJ1lFsqiqd' outfile.7z

Do you mean that the script seems to hang without printing nothing on screen? There seems to be some problem with gdrive servers today: if you try to download the file with a browser, it also takes a long while to respond... But if you wait it'd work.

Hmm, yeah. That must have been the issue.

v1.3 is a back to correct v1.1 behaviour.
v2.0 with resuming capabilities will be left in a different branch for now.