That’s a bash script that runs via cron.
One thing to note: this uses the cookies from a logged-in browser session because at some point YouTube blocked password log in from youtube-dl. This was is a bit of a pain to set up, and I wish it was not the case, but it mostly works.
- I have a script that downloads my liked videos (in case they get deleted, which I’ve found out happens a fair bit)
- I also have a script to download my watch later videos (for sync to devices without YouTube Premium/Red/whatever)