a ATOM and RSS feed parser customized for BBG
npm install bbg-feed-read$ npm install feed-read
var feed = require("feed-read");
feed(url, callback) feed("http://craphound.com/?feed=rss2", function(err, articles) {
if (err) throw err;
// Each article has the following properties:
//
// * "title" - The article title (String).
// * "author" - The author's name (String).
// * "link" - The original article link (String).
// * "content" - The HTML content of the article (String).
// * "published" - The date that the article was published (Date).
// * "feed" - {name, source, link}
//
});
feed.rss(rss_string, callback)The callback receives (err, articles).
feed.atom(atom_string, callback)The callback receives (err, articles).
feed.identify(xml_string) // => "atom", "rss", or falseReturns false when it is neither RSS or ATOM.