12

YouTube officially supports channel RSS feeds, but I'm facing severe difficulties in finding the feed. Using the channel URL isn't possible at least in Thunderbird. Firefox appears to be currently unable to detect the feed (used to work in the past, but somewhat unreliably and refreshing the page was occasionally necessary) and Google Chrome has no native RSS support to my knowledge.

There's a method to manually create a feed, but it may no longer work (channel-external-id appears not to exist in the source of all channels, there's channel_id instead):

  1. View the page’s source code
  2. Look for the following text: channel-external-id
  3. Get the value for that element
  4. Replace that value into this URL:

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

example channel: https://www.youtube.com/user/SesameStreet/videos

migrated from superuser.com Nov 10 '17 at 16:37

This question came from our site for computer enthusiasts and power users.

8

Actually what you suggested, is exactly the RSS feed address, although it was changed a bit from the procedure described in your question, there correct string to search is externalId.

With script

The following script will extract the feed URL and will output it to the console:

for (var arrScripts = document.getElementsByTagName('script'), i = 0; i < arrScripts.length; i++) {
    if (arrScripts[i].textContent.indexOf('externalId') != -1) {
        var channelId = arrScripts[i].textContent.match(/\"externalId\"\s*\:\s*\"(.*?)\"/)[1];
        var channelRss = 'https://www.youtube.com/feeds/videos.xml?channel_id=' + channelId;
        var channelTitle = document.title.match(/\(?\d*\)?\s?(.*?)\s\-\sYouTube/)[1];
        console.log('The rss feed of the channel \'' + channelTitle + '\' is:\n' + channelRss);
        break;
    }
}

Result:

The rss feed of the channel 'Sesame Street' is:
https://www.youtube.com/feeds/videos.xml?channel_id=UCoookXUzPciGrEZEXmh4Jjg

Where to save it

  1. You can use it as a user-script (with Greasemonkey or Tampermonkey for example).
  2. You can use it as a Bookmarklet.
  3. Copy the code and paste it into the developer console.

Note: If you choose options 1 or 2 - it would be more convenient to replace the console.log command with alert to get a popup instead of a message to the console.


Manually

  1. Open the desired YouTube channel page.
  2. Open the view-source of that page (one of the following):
    • Ctrl+U.
    • Right click --> View page source.
    • Add view-source: to the beginning of the url in the address bar.
  3. Search for the term externalId
  4. Right after it, there will be a random code (the channel id) in the form of: UCoookXUzPciGrEZEXmh4Jjg
  5. Add the code you found as a suffix to https://www.youtube.com/feeds/videos.xml?channel_id= and now that's your RSS feed for that channel.
  • rssUrl unfortunately doesn't exist in the source of every channel, for instance view-source:https://www.youtube.com/channel/UC0YagOInbZxj10gaWwb1Nag/ and view-source:https://www.youtube.com/channel/UCEBTfxJ13zkpZVbZTF3aukg. – user598527 Aug 25 '18 at 6:50
  • 1
    I'll check it out, and improve my answer, thanks – arieljannai Aug 25 '18 at 7:56
  • I found the thing, I'll update my answer later today! – arieljannai Aug 25 '18 at 8:23
  • @user598527 Updated :) – arieljannai Aug 25 '18 at 8:51
  • Thank you for updating. I haven't been able to install the bookmarklet by using the standard method (dragging code to the bookmarks toolbar). Based on my experience bookmarklets start with javascript:, at least that will help with the browser installation procedure. – user598527 Aug 25 '18 at 12:59
1

The method you mention currently works, but only in some circumstances, the exact text to look for is data-channel-external-id and it works in IE11, for example. Far easier is getting the <channel-id> in the channel URL, that is composed like this

https://www.youtube.com/channel/<channel-id>

Anyway there is a long more supported way to do this, and it reflect the fact that YouTube likes you to subscribe the channels you want to link through RSS feed.

If you subscribed the channel you are looking the RSS feed for, you can find it listed in your Manage Subscription page, there you can scroll down all the way until you find the "Export in RSS readers" button: clicking on on that button will allow you to download an XML file that has the channel names and RSS feeds for all subscribed channels.

Those RSS feeds will always be updated if something changes in how YouTube expose them.

0

Open the console with F12 and execute

window["ytInitialData"].metadata.channelMetadataRenderer.rssUrl
  • I get the TypeError: window.ytInitialData.metadata is undefined error when running in Firefox. Should this command work on all pages of a channel? – user598527 Sep 18 at 8:46
  • Hmm, seems like it doesn't work on all pages – goweon Sep 19 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.