prasmussen / gdrive

Google Drive CLI Client
MIT License
8.99k stars 1.19k forks source link

download stopped due to file identified as malware or spam #234

Open dd-han opened 7 years ago

dd-han commented 7 years ago

console show:

Failed to download file: googleapi: got HTTP response code 403 with body: {
 "error": {
  "errors": [
   {
    "domain": "global",
    "reason": "cannotDownloadAbusiveFile",
    "message": "This file has been identified as malware or spam and cannot be downloaded."
   }
  ],
  "code": 403,
  "message": "This file has been identified as malware or spam and cannot be downloaded."
 }
}

anyway to bypass this file or force download file ?

szunyi commented 7 years ago

you can download this file from browser?

dd-han commented 7 years ago

@szunyi Yes, I can force the download after confirming the warning on the browser.

But here I can't.

keiwanjamaly commented 6 years ago

Is there a solution for this? Because I have the same problem.

dd-han commented 6 years ago

@Bomel no, I manually download file to my computer by web browser

then upload to headless machine by ssh

s4y commented 6 years ago

FYI: There's a parameter, acknowledgeAbuse=true, that can be passed to bypass this warning. The API docs ask that software explicitly get permission from the user before passing it, and passing it for a non-blocked file is an error.

mbenlioglu commented 5 years ago

User can be prompted to acknowledge abusive file to forcefully download

ijat9917 commented 5 years ago

User can be prompted to acknowledge abusive file to forcefully download

How? in terminal?

DKB0512 commented 4 years ago

How to fix it in code? can anyone tell me

dd-han commented 4 years ago

@dkb007 I switch to Rclone for my purpose

Pakos091 commented 2 years ago

User can be prompted to acknowledge abusive file to forcefully download

How? in terminal?

Did you find out?

Proff-Roman commented 2 years ago

Все решается просто. В файле /gdrive/drive/download.go находим: res, err := self.service.Files.Get(f.Id).SupportsTeamDrives(true).Context(ctx).Download() заменяем на: res, err := self.service.Files.Get(f.Id).AcknowledgeAbuse(true).SupportsTeamDrives(true).Context(ctx).Download()

Как компилировать - смотрим тут - https://github.com/prasmussen/gdrive/issues/392#issuecomment-472186479

PS: использовать отдельно. Т.е. для нормальных файлов - обычную версию gdrive. Для плохих файлов - gdrive измененный. С другим именем например, в варианте с PHP: $str = 'gdrive download --no-progress --path /home/temp/ ' . $drive_id; $out = shell_exec($str); if ( strpos($out, 'This file has been identified as malware or spam and cannot be downloaded') !== false ) { $str = 'gdrivesu download --no-progress --path /home/temp/ ' . $drive_id; $out = shell_exec($str); }