WARNING! This article has been written a long time ago. It may no longer represent the current views of the author!

newsbeuter - RSS for YouTube and more

Turns out I have been using newsbeuter as my go-to RSS reader for a year now. I used Liferea in the past and frankly I was satisfied with the experience but… (there are always some buts!) I realized what a memory hog that program was. With that mindset I switched to newsbeuter and I don't plan on going back! It fits my workflow quite nicely and moreover it tends to do one job and does it well! You can pipe articles to other commands (very UNIX approach) and it proves to be useful.

Podcasts, web comics and video streams in RSS

RSS nowadays is more about media than textual content (which is sort of sad) but it still is useful for syndication. And newsbeuter is great for managing large number of feeds. Despite being based in terminal you can still experience videos or listen to podcasts using the magic of the pipe command and your favourite player. Let's take a closer look at how it works using YouTube channel feeds as an example.

Getting RSS feed for YouTube channel

You can use this address:

    https://www.youtube.com/feeds/videos.xml?user=USERNAME

you just need to change the USERNAME to the part of URL of desired channel. So if the channel URL is:

    https://www.youtube.com/user/everyframeapainting

you use the last part for feed address - like this:

    https://www.youtube.com/feeds/videos.xml?user=everyframeapainting

Unfortunately, I couldn't manage to get it working with channels that do not have username. (If you know how to do that please tell me how! ;) )

Now we can use the pipe command in newsbeuter - |. Since mpv (the video player that I like) needs video address as its argument for playing online media I made simple one line wrapper for extracting YouTube video links (it should be more general for playing from different feeds but I just wanted to make simple proof-of-concept). You can use, distribute and modify it freely as Beerware ;)

    #!/bin/bash
    #
    # <jakub.olczyk@openmailbox.org> wrote this stuff. 
    # As long as you retain this notice you can do whatever the fuck you want to
    # with this stuff. And if we meet some day, and you think this stuff is worth
    # it, you can buy me a beer in return. Jakub Olczyk
    #
    grep 'http' | awk '{print $2;}' | xargs mpv

I hope this points into the right direction for making your own scripts to work with newsbeuter. Not needing web browser (read memory hog) to get the content I like is liberating for me. As well as watching video without Flash plugins and tracking JavaScript.


Here for historic purposes is the only comment on this post

cmd

Posted on Sun 12 February 2017

I think you already told me that you figured it out by yourself, but the blogpost hasn't been updated yet, so I'm gonna put it here.

When the channel has no user it must have channel id (I think it's also the case with usernamed channels, so this method would be more universal). When you find out channel id, simply put it in link below:

    https://www.youtube.com/feeds/videos.xml?channel_id=CHANNELID

Also I had it figured while looking for rss for quite neat channel, so here it is as example (and if anyone would like to check it out):

    https://www.youtube.com/feeds/videos.xml?channel_id=UCBe0hmL6KkKU9tgQsobXB2g