I am currently utilizing the Google Feed API to extract a thumbnail from an RSS feed ("media:thumbnail")
The media:thumbnail element in the RSS feed is structured as follows:
<media:thumbnail url="http://anyurl.com/thumbnailname.jpg" width="150" height="150"/>
Just to clarify, the thumbnail is not nested within a media:group
This is how the script appears:
google.load("feeds", "1");
function initialize() {
var feed = new google.feeds.Feed("http://website.com/news/feed/");
feed.setNumEntries(20);
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 div = document.createElement("div");
div.appendChild(document.createTextNode(entry.title));
div.appendChild(document.createTextNode(entry.link));
container.appendChild(div);
}
}
});
}
google.setOnLoadCallback(initialize);
</script>
The TITLE and LINK fields are being fetched correctly. However, information about retrieving media:thumbnail or its URL specifically is missing from the Feed API documentation.
Does anyone have insights on how I can obtain the thumbnail URL using the feed API?