wkentaro / gdown

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

Works on my macbook, but not on amazon ec2 #282

Open Raphael-Quinones opened 10 months ago

Raphael-Quinones commented 10 months ago

Provide environment information

Amazon EC2 instance (Ubuntu)

/home/ubuntu/mydir/venv/bin/python
Python 3.10.12
gdown              4.7.1

My Macbook ()

/Users/me/Documents/VS Code/mydir/venv/bin/python
Python 3.10.6
gdown              4.7.1

What OS are you using?

Ubuntu

Describe the Bug

Downloading google docs file https://docs.google.com/document/u/1/d/1xCz_3YHDp1-Cj0fWxdQHHGI1Vq2e5GUgkyjSrD9qV_Y/edit

Using URL

/home/ubuntu/mydir/venv/lib/python3.10/site-packages/gdown/parse_url.py:44: 
UserWarning: You specified a Google Drive link that is not the correct link to download a file. 
You might want to try `--fuzzy` option or the following url: 
https://drive.google.com/uc?id=1xCz_3YHDp1-Cj0fWxdQHHGI1Vq2e5GUgkyjSrD9qV_Y
  warnings.warn(

Using ID

Access denied with the following error:

        Cannot retrieve the public link of the file. You may need to change
        the permission to 'Anyone with the link', or have had many accesses. 

You may still be able to access the file from the browser:

         https://drive.google.com/uc?id=1xCz_3YHDp1-Cj0fWxdQHHGI1Vq2e5GUgkyjSrD9qV_Y 

Shows this warning on Amazon EC2 when using gdown.download() And, the downloaded file is not properly downloaded.

This works well with the same parameters on my macbook.

Expected Behavior

File should be downloaded properly without warnings

To Reproduce

No response

Stefan2142 commented 5 months ago

Dont amazon blocks outbound requests by default somewhere in the config/firewall and you need to unblock it/allow it?