Automating YouTube downloads using RSS and Newsboat
I’ve recently found myself less and less enthused to look at my phone and wanting to spend more time on my desktop and the various laptops I have around. I recently stumbled on a really awesome script that automates downloading YouTube videos from an RSS feed in Newsboat and I’m grateful to find it for my low-end or old PCs.
RSS Setup
I run a FreshRSS instance and have been curating my feed items for many years now. In my RSS feeds are blogs, news sites, newsletters, subreddits, and my YouTube subscriptions. I try to cram essentially everything into my feeds.
On my Pinebook Pro I mainly stick to CLI-only interactions. I have Manjaro installed with XFCE, but the PBP really doesn’t do well with GUI applications. Some are better than others, but its still slow. I gave up on it for a while and then decided my best use for it was to learn about a bunch of CLI/TUI/Ncurses applications that will run much smoother on the PBP hardware.
In that time I have found tons of great apps and one of my favorites is Newsboat. For a TUI interface, I love it for reading my RSS feeds. No distractions, fast, and easy to navigate on any hardware. Newsboat also connects to FreshRSS so I can keep my feeds in sync across devices.
In the last week or so I’ve also been playing around with an ancient laptop after being inspired by 82mhz for an Old Computer Challenge. Old might be an understatement for this laptop I’ve been configuring. It is a Compaq V2615US circa 2004. It has a single core, single thread AMD Sempron 3000+ processor and a 40GB 4200RMP IDE hard drive. I didn’t want to use the original Windows XP installed and instead set it up with Debian 12 plus the Trinity Desktop Environment. But, I mostly use it with a DE and use my CLI/TUI apps.
And Newsboat has been working perfectly, except being able to watch YouTube videos. The videos are just too much for this machine, especially in the browser.
A script to the rescue
In my feeds is the commandline subreddit and that is how I stumbled on this script. Here’s the summary from their Github:
“I sure love the mix of newsboat+mpv+youtube-dl to watch videos from my favourite creators directly from my command line. But sometimes I want to download them beforehand and have them sorted into different folders. Here is the script to do exactly that.”
This is perfect for my low-end Pinebook Pro and the dinosaur Compaq I’ve been using. Using this script it can sort through my feeds, find my unread YouTube videos, and download them at the quality that will play on these devices.
The instructions are simple to setup. All you need to do is point it at the location of the Newsboat cache.db, tell it where to store the downloaded files, and then configure the yt-dlp options. For me, I want to download at 360p, embed the thumbnail, and download the subtitles (standard and auto-generated).
Once the videos are downloaded, they are all stored in ~/Videos and can watch with mpv. All you need is Newsboat installed and configured, ffmpeg, yt-dlp, detox, and sqlite3 installed. You don’t have to have FreshRSS, it will work with whatever configuration you have for your feeds in Newsboat.
This script will also work well for archiving videos on YouTube using RSS feeds as the source. Using it this way will work perfectly for my “intermittent internet” setup I’ve been using for no internet days. I can download my feeds and all the videos in them for offline playback without having to do it one at a time. Instead, it just reads it from my RSS feeds and will only download the videos I haven’t watched yet.
Check out the script and the instructions on Jocomol’s Github.
jocomol / newsboat_video_downloader
- - - - -
Did you like this post? Give it an upvote by clicking on the arrows below! Sending me an upvote is like you and I giving each other a high five.
🙏 😎
Thank you for reading! If you would like to comment on this post you can start a conversation on the Fediverse. Message me on Mastodon at @cinimodev@masto.ctms.me. Or, you may email me at blog.discourse904@8alias.com. This is an intentionally masked email address that will be forwarded to the correct inbox.If you enjoy the random stuff I write here, post to Mastodon, or watch on YouTube, and are feeling generous, I am open to tips of Ko-fi.