CLI utility to search and view/download YouTube videos
5
votes
4
answers
8563
views
Is there a utility that can search YouTube from the command line, and then either **view** or **download** the search results according to user input?
$ youtube-search madonna
1 Madonna - Hung Up (Official Music Video)
madonna ♩ 180M views 9 years ago
https://www.youtube.com/watch?v=EDwb9jOVRtU
"Hung Up" by Madonna from Confessions On A Dance Floor, available now.
2 Madonna - Like A Prayer (Official Music Video)
madonna ♩ 69M views 9 years ago
https://www.youtube.com/watch?v=79fzeNUqQbQ
2006 WMG Like A Prayer.
etc.
And then you can enter:
- "v1" to view video 1 (with VLC, etc.)
- "d1-3" to download videos 1-3 (with youtube-dl, etc.)
- "n" to view next page of search results
What I tried so far:
googler works partially with YouTube, but for some reason only shows two search results when searching for "Madonna". Also there is not the choice between view and download.
youtube-dl has a search function, but doesn't seem to print the search results nor accept user input.
youtube-dl -j ytsearch:madonna
lists metadata about search results, but doesn't seem to contain the video link, title and description that would be desired.
Asked by forthrin
(2469 rep)
Jan 22, 2019, 03:34 PM
Last activity: Apr 19, 2022, 09:01 AM
Last activity: Apr 19, 2022, 09:01 AM