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

Nothing particularly difficult or unique, but adding a simple script in crontab to download new videos from my youtube Favorites playlist has been immensely helpful in archiving over the years, as videos inevitably get blocked or deleted.

    yt-dlp --download-archive archive.txt --no-overwrites -o '%(playlist_index)s - (%(uploader)s) %(title)s.%(ext)s' --format bestvideo+bestaudio --yes-playlist --ignore-errors --write-info-json [PLAYLIST_URL]
Edit: if you use this, note that you should probably sort your playlist by Date added (oldest), otherwise the playlist_index doesn't work correctly. Or you can just leave out playlist_index from the filename if you don't care about it.


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

Search: