Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

In this case I'm not sure why a convenience wrapper is even needed, yt-dlp already works with playlists just fine


>I'm not sure why a convenience wrapper is even needed,

Author wanted yt-dlp to be fed with a custom text file: "playlists.txt"

The script loops through that text file, parses it, and then launches yt-dlp for each valid line with a channel name.


Which is essentially just this:

    yt-dlp -o "%(channel)s/%(playlist_title)s/%(title)s.%(ext)s" -a playlists.txt
I'm not sure if that warrants a HN post


Right? Just add this to .bashrc:

alias yt-pl='yt-dlp -o "%(channel)s/%(playlist_title)s/%(title)s.%(ext)s" -a playlists.txt'


So -o "%(channel)s - %(title)s.%(ext)s", --batch-file and optionally --download-archive?

https://github.com/yt-dlp/yt-dlp#:~:text=channel%20%28string...

https://github.com/yt-dlp/yt-dlp#:~:text=%2Da%2C%20%2D%2Dbat...

https://github.com/yt-dlp/yt-dlp#:~:text=%2D%2Ddownload%2Dar...

Not to mention that the script is clearly LLM-generated


Agree. Now it's easier to ask you favorite command line AI (e.g. Gemini CLI) something like "download this list of playlists with yt-dlp" rather than learn someone else's code or even check the manual.


The script linked was just vibe coded. Ai isn’t that great with the ytdl params, yet. It’s obvious because if an LLM really knew how to use ytdl it would have used the input file option instead of looping through a file and invoking for each one.


> Ai isn’t that great with the ytdl params

Gemini nails it:

When downloading multiple playlists, it is usually better to organize them into separate folders so the files don't all end up in one giant mess. You can use an output template to automatically create folders based on the playlist title:

yt-dlp -a playlists.txt -o "%(playlist_title)s/%(playlist_index)s - %(title)s.%(ext)s"


Interesting, must be a new fix. A couple months ago I tried to have it create a command and it hallucinated params.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: