wkentaro / gdown

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

Wrong Filename #334

Open FloatingMind12 opened 8 months ago

FloatingMind12 commented 8 months ago

Provide environment information

/home/phoe/.venv/bin/python Python 3.11.4 gdown 5.1.0

What OS are you using?

Ubuntu 23.04

Describe the Bug

The output filename is not automatically set anymore, instead I get something like "download?...&confirm=t&...&uuid=...". Maybe it's something related to how the download link was changed to https://drive.usercontent.google.com/download?id=...

Expected Behavior

I expect gdown to get the right filename

To Reproduce

Just download any file using the gdown command

oleksandr-poberezhnyi commented 8 months ago

similar problem.

Michaelfun commented 6 months ago

same with me

Michaelfun commented 6 months ago

I found a way to get the right filename, in sitepackage in gdown library, then in download.py line 358 change if tmp_file: f.close() shutil.move(tmp_file, output) to if tmp_file: f.close() filename_from_url = os.path.join(output,filename_from_url) shutil.move(tmp_file, filename_from_url) that fixed everthing for me now file come with right file name

wkentaro commented 6 months ago

It won't reproduce for me. Can you give me an example?

image