Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

php

youtube

rss

Now that API v2 is gone, what would be a way to get a simple RSS feed of a channel, without v3 API? I'm open to Yahoo Pipes or any workaround that is simpler than creating an application for v3 API if the target is a feed reader. I only need an RSS feed. It was available publicly until now and it can cease any minute now (I think). So why not let access to it without an API key anymore.

like image 735
Firsh - justifiedgrid.com Avatar asked Apr 20 '15 15:04

Firsh - justifiedgrid.com


4 Answers

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

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

So you could generate new feeds from this structure if you know the channel id. This kind of feeds are not getting the "https://youtube.com/devicesupport" error, so I expect they are going to keep working.

like image 74
AitorF Avatar answered Oct 14 '22 17:10

AitorF


You can get the feeds like this:

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 which used to be supported (with additional parameter &alt=JSON) is not supported anymore.

Additionally you can request for API key for public access to your YouTube videos from your developer console and get YouTube Videos, Playlists in JSON format like 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}

More information from YouTube v3 docs.

like image 26
Primoz Rome Avatar answered Oct 14 '22 17:10

Primoz Rome


in you tube, click on the subscriptions on the left hand pane. This will open up all your subscriptions in the center of the page. Scroll down and you'll find a Export to RSS reader button which produces an xml file of all your subscriptions . I've done this and added it to my prefered rss reader feedly.

like image 41
Halo Jones Avatar answered Oct 14 '22 16:10

Halo Jones


If you inspect any Youtube channel page, inside the <head> you will find an rss meta node like this:

<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.

like image 41
Matt Way Avatar answered Oct 14 '22 16:10

Matt Way