Using YouTube with an RSS reader
2022/05/22As you might know, YouTube provides channel content as RSS feeds under the url youtube.com/feeds/videos.xml. It is a really handy way to see new upload from channels without having to use the website or rely on the API.
There is a big limitation though: you have to open the YouTube website to get the channel IDs. This is where ytfzf becomes really handy. It has an option to filter what types of content to display, and using that I was able to come up with a one-liner that will bring up a menu to select a channel and then add it to newsboat, my preferred RSS reader.
echo "https://www.youtube.com/feeds/videos.xml?channel_id=$(echo "$channel" | ytfzf --type=channel --disable-submenus -I L | tail -1 | cut -d'/' -f5)" >> /home/adam/.newsboat/urls
The disable submenus option is there to prevent ytfzf from opening the channel page instead of outputting the channel url.
The only thing still missing from this setup is discovering new channels to follow.