mpv-scripts icon indicating copy to clipboard operation
mpv-scripts copied to clipboard

youtube-search.lua: Use yt-dlp instead of curl+API

Open gunir opened this issue 1 year ago • 3 comments

##################################### Is this a request for a brand new script? If so please make a Discussion thread instead #####################################

Is your feature request related to a problem? Please describe. I like the idea of being able to search and browse Youtube infinitely, but having to enter API key is a bit rough, yt-dlp support searching out-of-the-box and doens't require API at all.

Describe the solution you'd like Use yt-dlp instead, with --flat-playlist it's very very fast:

yt-dlp ytsearch10:SEARCH --get-id --get-title --flat-playlist

10 = number of result, of course it must be used with --flat-playlist to increase searching speed by ten forth.

Describe alternatives you've considered yt-dlp instead of curl+API

Additional context Should be good enough information.

gunir avatar Oct 03 '23 03:10 gunir