Yahoo Pipes RSS pubDate appears as "undefined" when viewed through the Google feeds API

I have an RSS feed that I created on Yahoo Pipes. You can view it here .

However, when you view this through the Google feed API, pubDate is approaching as undefined (to avoid doubt, I also tried formatting, which is the case with PubDate).

Here is the code I used:

<div class="clear" id="feed"> &nbsp;</div> <script type="text/javascript"> var feedcontainer=document.getElementById("feed") var feedurl="http://pipes.yahoo.com/pipes/pipe.run?_id=f0eb054e3a4f8acff6d4fc28eda5ae32&_render=rss" var feedlimit=5 var rssoutput="<h3>Business and Tax News</h3><ul>" function rssfeedsetup(){ var feedpointer=new google.feeds.Feed(feedurl) feedpointer.setNumEntries(feedlimit) feedpointer.load(displayfeed) } function displayfeed(result){ if (!result.error){ var thefeeds=result.feed.entries for (var i=0; i<thefeeds.length; i++) rssoutput+="<li><a href='" + thefeeds[i].link + "'>" + thefeeds[i].title + " (" + thefeeds[i].pubDate +")</a></li>" rssoutput+="</ul>" feedcontainer.innerHTML=rssoutput } else alert("Error fetching feeds!") } window.onload=function(){ rssfeedsetup() } </script> 

... and here it is on the page.

I did some of Google for this and found that there seems to be a small documented issue with the way Yahoo Pipes displays PubDate. I tried following the instructions in the question Can't get pubDate for output in Yahoo! Pipes (the resulting pipe is here ), but that doesn't seem to make any difference.

How can I get the correct PubDate in Google Feed from the Yahoo Pipes RSS feed? Is it possible?

+3
source share
1 answer

Just change:

 thefeeds[i].pubDate 

in

 thefeeds[i].publishedDate 

I tested this on the Google Code playground:

  • https://code.google.com/apis/ajax/playground/#load_feed
  • In OnLoad change the URL to the Yahoo Pipes link
  • In the main loop in feedLoaded edit the middle part:

     div.appendChild(document.createTextNode(entry.title)); div.appendChild(document.createTextNode(entry.publishedDate)); console.log(entry); 

In particular, in the JavaScript console, you can see that the entry object has a publishedDate property instead of pubDate .

He works on the playground, he must also work on your site. I hope.

+2
source

All Articles