Get latest video from a YouTube RSS feed

Because it was really hard to find something about this with Google or the forums search engine, I’m posting this for future reference and to perhaps help others looking for the same solution.

I was looking for a way to post the latest video of any given YouTube channel, the title and a link to it. I couldn’t find a way to get it working with the pure RSS of YouTube, but using a RSS to JSON converting API (I used, but there are several such services), I was able to get the data as JSON and extract it easily from there.

Latest YouTube video: $(eval const rss = $(urlfetch json<CHANNEL_ID_HERE>); rss.items[0].title + " -" + rss.items[0].guid.split(":")[2];)

You will need to change the CHANNEL_ID_HERE part with your actual channel ID (not your channel name). This will result in something like:

Latest YouTube video: My top 10 ice cream flavors -

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.