Forked from arieljannai/get_youtube_channel_rss_feed.js
Last active
January 16, 2021 07:42
-
-
Save yanglr/3b76229aa3015c7777e3baca6fd49732 to your computer and use it in GitHub Desktop.
Script to get YouTube Channel RSS Feed (Add to Greasemonkey or Tampermonkey)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Get Youtebe RSS | |
// @namespace http://tampermonkey.net/ | |
// @include https://*youtube.com/* | |
// @require http://code.jquery.com/jquery-3.3.1.min.js | |
// @version 0.1 | |
// @description try to take over the world! | |
// @author Bravo Yeung | |
// @grant none | |
// ==/UserScript== | |
(function() { | |
'use strict'; | |
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); | |
$('#subscriber-count').append(' <a href="' + channelRss + '">RSS Link</a>') | |
break; | |
} | |
} | |
})(); |
I installed it ... not sure how to use it!? what should I click?
@eyadsibai
In developer console, its look like:
The rss feed of the channel 'TheHodgetwins' is:
https://www.youtube.com/feeds/videos.xml?channel_id=UC69y0hZJEiF_drrxE50VLTQ
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Get RSS of your youtube channel.