wkentaro / gdown

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

Feature request #135

Closed DarrenPIngram closed 2 years ago

DarrenPIngram commented 2 years ago

Might it be possible for gdown to auto-correct and download? Use case: on mobile I am given a link. I can cut and paste it but it "errors" yet gdown knows a possible solution. It is less easy to edit a pasted link on a small screen.

Please see my trial below:

 % gdown https://drive.google.com/file/d/1124NBYag7WKjuo7u2wgON-3NW8wxd9nt/view?usp=sharing
/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/gdown/parse_url.py:35: UserWarning: You specified Google Drive Link but it is not the correct link to download the file. Maybe you should try: https://drive.google.com/uc?id=1124NBYag7WKjuo7u2wgON-3NW8wxd9nt
  warnings.warn(
Downloading...
From: https://drive.google.com/file/d/1124NBYag7WKjuo7u2wgON-3NW8wxd9nt/view?usp=sharing
To: /Users/di/view?usp=sharing
70.5kB [00:00, 30.4MB/s]

Now the first "downloading" clearly doesn't work.

If you download the suggested link it works well.

gdown https://drive.google.com/uc?id=1124NBYag7WKjuo7u2wgON-3NW8wxd9nt
Downloading...
From: https://drive.google.com/uc?id=1124NBYag7WKjuo7u2wgON-3NW8wxd9nt
To: /Volumes/XSSD/Chrome Downloads/gdowntest/Comedians.Giving.Lectures.S02E05.540p.HDTV.x264.mkv
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 452M/452M [00:08<00:00, 54.1MB/s]
di@MacPro gdowntest % ls
Comedians.Giving.Lectures.S02E05.540p.HDTV.x264.mkv view?usp=sharing
wkentaro commented 2 years ago

Does gdown --fuzzy work for you? If you want it by default, you can create an alias in your .bashrc with alias gdown='command gdown --fuzzy'.

DarrenPIngram commented 2 years ago

Thanks. It did. Hadn't appreciated the scope of the fuzzy command.

On Sat, 18 Dec 2021 at 15:07, Kentaro Wada @.***> wrote:

Does gdown --fuzzy work for you?

— Reply to this email directly, view it on GitHub https://github.com/wkentaro/gdown/issues/135#issuecomment-997200266, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABV5MAANEBXBMUOOWMIQ7KLURSBRLANCNFSM5KKTT2SQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you authored the thread.Message ID: @.***>