3
votes

i have made an application in which i am fetching YouTube videos using this url:

http://gdata.youtube.com/feeds/api/users/GoogleDevelopers/uploads?v=2&alt=jsonc

in a same way i want to fetch YouTube videos using this url:

http://www.youtube.com/playlist?list=PL34F010EEF9D45FB8

Problem: I don't know how can i get YouTube JSON GData URL for this link...

http://www.youtube.com/playlist?list=PL34F010EEF9D45FB8

3
Please trying to search first before posting question.Thanksρяσѕρєя K
@ρяσѕρєя K ok i will remember thatUdhikriman

3 Answers

0
votes

Dont use gdata for youtube. Use OhEmbed feature of youtube. for your link the youtube ohembed link is

http://www.youtube.com/oembed?url=http://www.youtube.com/playlist?list=PL34F010EEF9D45FB8

0
votes

if you want to retrive playlist data from YT Playlist then use

    var feedUrl = "http://gdata.youtube.com/feeds/api/playlists/"+nPlaylistID+"?max-results=8";
    if (result.error || !result.url) 
    {
$('#divid').hide();
return;
}

  var feed = new google.feeds.Feed(result.url);
  feed.setNumEntries(50);
  feed.load(function (result) {

   for (var i = 0; i < result.feed.entries.length; i++) {
var entry = result.feed.entries[i];
var vidhash = /=(.*)&(.*)$/.exec (entry.link)[1];

  container.append('<div><a href="http://www.youtube.com/embed/'+vidhash+'" class="html5lightbox" title="'+entry.title+'"><img src="http://img.youtube.com/vi/'+vidhash+'/0.jpg" /><br />'+entry.title+'</a></div>\n');