<\/script>')

Rss feed google media: group

My problem is this: I wrote rss.xml with

<media:group>
  <media:thumbnail url:"johndoe.at/images/test.jpg" width='auto' height='50'>
  ....
  ....

      

for the image.

Everything can be extracted from rss, but media cannot be extracted. How can i do this? All other fields I retrieve with the following JS code:

function initialize() {
  var feed = new google.feeds.Feed("http://fastpshb.appspot.com/feed/1/fastpshb");
  feed.load(function(result) {
    if (!result.error) {
      var container = document.getElementById("feed");
      for (var i = 0; i < result.feed.entries.length; i++) {
        var entry = result.feed.entries[i];
        var title   = entry.title;
        var content = entry.content;
      }
    }
  });
}

      

+3


source to share


1 answer


I believe this will be available as an array of mediaGroups properties, so you will have



// verify mediaGroups are present and then retrieve the first one URL.
if (entry.mediaGroups) {
   var thumbnail = entry.mediaGroups[0].contents[0].url;
}

      

0


source







All Articles