There are a lot of YouTube videos that are mostly talking, I like listening to them as podcasts instead of watching the videos. This is a Python script that checks for updates and downloads audio from new videos of specified channels. I set up a crontab with this to download audio from YouTube channels and put them into my podcast client's sideloads folder in iCloud drive with Automator.
Normal mode:
python3 youtube-audio-autodownload.py
Debug mode:
python3 youtube-audio-autodownload.py -D
The script will not download anything the first time it runs, it will generate a file called 'last_downloaded' with the latest videos of each channel. It is a plain JSON file and can be modified if you like.
- ffmpeg
- youtube-dlp
- Having a YouTube API key and rename it to 'API_key', and put it in the same directory as this script. You can find out how to get one here.
If you don't know how to get the id of a YouTube channel, you can use this site.