fsantini / KoboCloud

A set of scripts to synchronize a kobo reader with popular cloud services
Other
958 stars 94 forks source link

Google Drive - Virus scan warning blocks downloads #160

Open marklar423 opened 11 months ago

marklar423 commented 11 months ago

When downloading large(1) single files from Google Drive, sometimes Google Drive will return an HTML page asking to skip a virus scan, instead of the file bytes. I've attached a sample of the HTML.

From my initial research of others with this problem, there doesn't seem to be an easy way around this just by using curl. One option could be to check the MIME type of the response, and if its HTML try to parse out the "continue" link. However, this is hacky and will likely break whenever Google changes that page.

Another option is rclone instead of curl, as added by https://github.com/fsantini/KoboCloud/pull/35 . Since rclone uses the Google API (and not raw HTTP) it doesn't have this issue and would work without any hacking / parsing HTML.

(1): The limit for "large" appears to be between 50 and 100 MB, as my ~50 MB files downloaded fine, but the 109 MB file I have downloaded the warning HTML instead.

marklar423 commented 11 months ago

virus scan warning.html.txt (Attaching sample HTML returned instead of file)