Following YouTube channels with RSS

Setup

#!/bin/bash
set -oeu pipefail

curl -s "$1" | xmllint --html --xpath 'string(//link[@title="RSS"]/@href)' - 2>/dev/null

Stick this script in your PATH (e.g. ~/.local/bin/ytrss).1 Make it executable: chmod +x ~/.local/bin/ytrss.

Then go to a YouTube channel page and copy the URL.

ytrss 'https://www.youtube.com/@youtube'
# Copy output to clipboard:
ytrss 'https://www.youtube.com/@youtube' | wl-copy

The output will be a feed URL:

https://www.youtube.com/feeds/videos.xml?channel_id=UCBR8-60-B28hp2BmDPdntcQ

Add this to your RSS reader app to see videos posted by the channel.

Control your experience on YouTube pages

Additionally I use two browser extensions to help control my experience on YouTube:

LeechBlock config page list:

youtube.com
+www.youtube.com/watch
+youtube.com/@*
+youtube.com/account
+youtube.com/channel
+youtube.com/feed/playlists
+youtube.com/feed/subscriptions
+youtube.com/playlist
+youtube.com/redirect
+youtube.com/results
+youtube.com/show

The plus means exclude (so allow, don’t block). My focus is on avoiding the algorithmic recommendations, so I allow viewing specific videos [/watch) (hiding the recommended feed with Unhook), searching for videos (/results), and viewing channels and playlists.

If you try out LeechBlock and find yourself struggling to stick with it, I have found it to be easier to get used to obeying the “Delaying page” rather than full block.

Why?

I do miss exploration a little bit. But I wasn’t finding good new stuff that often, so I prefer this, for now. Maybe there is a better way to discover new channels than YouTube’s main algorithm?


  1. I found this script from a Reddit comment.↩︎