How to get Youtube RSS feed after April 20, 2015 (without API v3)?

Now that API v2 is gone, how could you get a simple RSS feed without API v3? I am open to Yahoo Pipes or any workaround that is easier than building an application for the v3 API if the goal is a feed reader. I only need an RSS feed. It has been available publicly so far, and it may end at any moment (I think). So why not allow access to it without an API key anymore.

+61
php youtube rss
Apr 20 '15 at 15:45
source share
16 answers

The RSS Reader section https://support.google.com/youtube/answer/6098135?hl=en has the option to export your subscriptions to an OPML file. Then, looking at the contents of OPML, you can retrieve the feeds, and the structure of each feed:

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

Thus, you can generate new channels from this structure if you know the channel identifier. This type of feeds does not get the https://youtube.com/devicesupport error, so I expect them to continue to work.

+95
Apr 21 '15 at 8:53
source share

You can get the following channels:

https://www.youtube.com/feeds/videos.xml?channel_id=CHANNELID https://www.youtube.com/feeds/videos.xml?user=USERNAME https://www.youtube.com/feeds/videos.xml?playlist_id=YOUR_YOUTUBE_PLAYLIST_NUMBER 

But the JSON format that was supported (with the optional parameter &alt=JSON ) is no longer supported.

In addition, you can request an API key for open access to your YouTube videos from the developer console and get YouTube videos, playlists in JSON format, such as this:

 - Get Channels: https://www.googleapis.com/youtube/v3/channels?part=snippet%2CcontentDetails&forUsername={YOUR_USER_NAME}&key={YOUR_API_KEY} - Get Playlists: https://www.googleapis.com/youtube/v3/playlists?part=snippet%2CcontentDetails&channelId={YOUR_CHANNEL_ID}&key={YOUR_API_KEY} - Get Playlist Videos: https://www.googleapis.com/youtube/v3/playlistItems?part=snippet%2CcontentDetails%2Cstatus&playlistId={YOUR_PLAYLIST_ID}&key={YOUR_API_KEY} 

Additional information from YouTube v3 docs .

+55
Jul 21 '15 at 9:23
source share

in the handset, click on the subscriptions in the left pane. This will open all your subscriptions in the center of the page. Scroll down and you will find the "Export to RSS" button, in which you will receive an xml file of all your subscribers. I did this and added it to my preferred rss reader.

+10
May 10 '15 at 8:48
source share

If you look at any page of the Youtube channel, inside the <head> you will find the rss meta node as follows:

 <link rel="alternate" type="application/rss+xml" title="RSS" href="https://www.youtube.com/feeds/videos.xml?channel_id=UCn8zNIfYAQNdrFRrr8oibKw"> 

This should provide you with the data you need.

+6
Aug 05 '15 at 23:31
source share

Get the channel identifier by searching for the data-channel-external-id attribute in the source code of the YouTube channel page. (thanks helq).

This code will capture all video games and identifiers from the feed and upload it to an array:

 $channel_id = 'XXX'; // put the channel id here $youtube = file_get_contents('https://www.youtube.com/feeds/videos.xml?channel_id='.$channel_id); $xml = simplexml_load_string($youtube, "SimpleXMLElement", LIBXML_NOCDATA); $json = json_encode($xml); $youtube = json_decode($json, true); $yt_vids = array(); $count = 0; foreach ($youtube['entry'] as $k => $v) { $yt_vids[$count]['id'] = str_replace('http://www.youtube.com/watch?v=', '', $v['link']['@attributes']['href']); $yt_vids[$count]['title'] = $v['title']; $count++; } print_r($yt_vids); 
+4
Sep 29 '15 at 4:22
source share

I created a small PHP script that resets the Youtube URL for video links and then outputs them as an atom channel: https://gist.github.com/Skalman/801436d9693ff03bc4ce

URLs like https://www.youtube.com/user/scishow/videos work.

Cautions:

  • Tool does not clear dates
  • Playlists will not include more than 100 videos
  • Playlists include a play all link
  • The author is configured correctly only for channels (for example, not for playlists)
  • Youtube may block you if you use too much (but hopefully the limits are high enough)
  • Most likely a few more ...
+2
Apr 21 '15 at
source share

There is also an RSS Bridge that can extract RSS feeds from a variety of services such as Twitter, Google+, Flickr, Youtube, Identi.ca, etc.

source: https://github.com/sebsauvage/rss-bridge

demo server: https://bridge.suumitsu.eu/

+2
May 20 '15 at 17:30
source share

try using this url: https://www.youtube.com/feeds/videos.xml?user=USERNAME

Works great for me.

+2
Jul 10 '15 at 13:52
source share

From my blog post: http://tcodesblog.blogspot.com/search/label/howtofindyouryoutubechannelfeed




HOW TO FIND YOUR YOUTUBE CHANNELS OPTION

In the old days, it was easy (2009), but now after a few days it is much harder to find (from 2012 to the present). Here's a quick way to find a new channel from your YouTube channel. Remember to follow the list correctly!
  • First find your channel id . You can do this by going to your YouTube channel in your dashboard.

  • Copy Channel ID . Your channel ID can be found when visiting your YouTube channel from the control panel

  • Copy your channel id : copy your channel id and replace channelidgoeshere below with your channel id : https://www.youtube.com/feeds/videos.xml?channel_id=channelidgoeshere

  • Copy the entire YouTube channel channel and create a simplified channel: you can do this by creating a shorter channel link in FeedBurner at http://www.feedburner.com/ (requires a Google account. Free to use.), Which is also part of Google . Create a new feed (select I'm A Podcaster! To see how your videos appear in the feed and make your feed compatible with other feed readers, such as: Digg Reader, Apple iPhone Apple News App, Apple iPhone Podcasts App, Feedly etc.) -Modify an existing one by copying the entire YouTube channel channel, and then click Save feed information as usual

  • Your YouTube channel channel is now working, and your videos can be seen in the feed file directly in the FeedBurner feed. Mine is on YouTube as a channel at https://www.youtube.com/feeds/videos.xml?channel_id=UCvFR6YxwnYfLt_QqRFk_r3g and on FeedBurner as http://feeds.feedburner.com/youtube/warrenwoodhouse with my videos that are displayed just as a text format, as an example, since I need to update mine to show my videos. You can change various settings in FeedBurner and do other things, so it’s worth a try, as it is free and easy to use. I highly recommend using FeedBurner or another feed creation service, however FeedBurner is the best choice as it also includes the USM - Universal Subscription Mechanism, which means your feed can be read from any compatible device such as a computer, mobile phone (with the correct application installed), through an old web browser (for example, Internet Explorer, which supports web fragments and RSS / Atom / XML feeds).

Your feed can also be opened in the Apple iPhone App of the Apple app and the Apple iPhone podcasts on your Apple iPhone, Apple iPod Touch and Apple iPad, if you have correctly configured the settings for USM (Universal Subscription Mechanism). Once this works, your channel can be viewed through various services and devices.

Your FeedBurner feed allows you to create an email subscription, an Animator heading (which shows you how to link to the last post), as well as the number of subscribers, Chiclets and other interesting things.

I hope this answer turns out to be useful, and if you want to see more cool awesome coding methods, please feel free to check out my T-Codes website at http://warrenwoodhouse.webs.com/codes for more material.

+2
Jul 14 '16 at 11:23
source share

I created a Yahoo Pipes example here.
http://pipes.yahoo.com/pipes/pipe.info?_id=6eeff0110a81f2ab94e8472620770b11

You can run this channel by clicking “Run Pipe” without populating the API key. But when cloning, you must provide your own API key and channel ID (which can be obtained through the channel API). It’s required to automate channel selection by YouTube username, but it’s not easy to complete.

+1
May 09 '15 at 8:12
source share

I created a script package that creates an RSS feed for your new subscribed videos. You do not need an API key. The script uses 2 external toolkits: YouTube-DL and Xidel.

Anyway, read the following thread and go to post 98 to download the script: http://code.google.com/p/gdata-issues/issues/detail?id=3946#c98

I hope someone encodes this in php, python, javascript, powershell or bash.

+1
May 11 '15 at 11:57
source share

I think there are some changes in the youtube answer, so I am making some changes to get the channel id from the rss channel using Curl.

 $channel_id = 'XXXXXXXX'; // put the channel id here //using curl $url = 'https://www.youtube.com/feeds/videos.xml?channel_id='.$channel_id.'&orderby=published'; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); //curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); $response = curl_exec($ch); curl_close($ch); $response=simplexml_load_string($response); $json = json_encode($response); $youtube= json_decode($json, true); $count = 0; if(isset($youtube['entry']['0']) && $youtube['entry']['0']!=array()) { foreach ($youtube['entry'] as $k => $v) { $yt_vids[$count]['id'] = str_replace('http://www.youtube.com/watch?v=', '', $v['link']['@attributes']['href']); $yt_vids[$count]['title'] = $v['title']; $count++; } } else { $yt_vids[$count]['id']=str_replace('http://www.youtube.com/watch?v=', '', $youtube['entry']['link']['@attributes']['href']); $yt_vids[$count]['title']=$youtube['title']; } echo "<pre>"; print_r($yt_vids); 
+1
Sep 23 '16 at 10:19
source share

I found a Chrome extension called Youtube RSS-ify that introduces the RSS icon on the video, channel and navigation pages. That was what I was looking for.

Youtube RSS-ify extension screenshot

The icons look like this:

Youtube RSS-ify RSS icon

0
May 10 '16 at 11:34
source share

I used the code below to integrate Youtube Feed with the custom wordpress field "ACF plugin" and FancyBox

  <?php $channel_id = get_field('youtube_chanel_id'); //ACF text field if ($channel_id){ // if channel_id not empty -- START $youtube = file_get_contents('https://www.youtube.com/feeds/videos.xml?channel_id='.$channel_id); $xml = simplexml_load_string($youtube, "SimpleXMLElement", LIBXML_NOCDATA); $json = json_encode($xml); $youtube = json_decode($json, true); echo'<div class="col-md-12 youtube-videos-feed">'; foreach ($youtube['entry'] as $k => $v) { $id = str_replace(array("yt:video:"), "", $v['id']); // Remove "yt:video:" from ID value //$date = $v['updated']; // video updated date (disabled for now) $title = $v['title']; // video title echo '<a class="with-video" href="https://www.youtube.com/watch?v=',$id,'&autoplay=1&rel=0&controls=0&showinfo=0&modestbranding=0" data-fancybox="videos" data-caption="',$title,'" title="',$title,'" > <div class="col-md-3 main-image post-image img-fancy"> <img src="https://img.youtube.com/vi/',$id,'/0.jpg" alt="',$title,'" > </div> </a>'; } echo'</div>'; } // if channel_id not empty -- END ?> 
0
Jan 10 '19 at 19:15
source share

I would suggest using a great rss parser. Many of them are available, but you can try http://simplepie.org/ , one of the best I've used for my personal projects.

Its pretty well documented with some examples.

Usage example

Note. Used YouTube College Anniversary, you can get it on the channel page itself

 <?php include_once('../autoloader.php'); // Parse it $feed = new SimplePie(); $feed->set_feed_url('https://www.youtube.com/feeds/videos.xml?channel_id=UCPDXXXJj9nax0fr0Wfc048g'); $feed->enable_cache(false); $feed->init(); $items = $feed->get_items(); foreach ($items as $item) { echo $item->get_title() . "\n"; } var_dump($feed->get_item_quantity()); 
-one
May 12 '16 at 6:18
source share

The easiest way to get the channel id:

Open the subscription manager (left pane, below the subscriptions) and click on the desired user.

The URL will look like this: https://www.youtube.com/channel/XXXXXXXXXXXXXXXXX

Thus, the feed URL should be:

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

Note. It’s better to use channel identifiers rather than usernames, as usernames may change.

-one
May 21 '16 at 1:44
source share



All Articles