Skip to content

Instantly share code, notes, and snippets.

@oz
Created March 6, 2012 02:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oz/1982977 to your computer and use it in GitHub Desktop.
Save oz/1982977 to your computer and use it in GitHub Desktop.
Apparently a bug in feedme.js parser events
var http = require('http')
, url = require('url')
, feedme = require('feedme')
, opts = url.parse("http://wtf.cyprio.net/atom/1");
var parser = new feedme(true);
parser.on('end', function() {
var feed = parser.done();
console.log("Parsing ended... " + feed.title);
});
var req = http.get(opts, function(res) { res.pipe(parser); })
.on('error', function(e) { console.log(e.message); });
req.end();
/*
* $ node feed.js
* Parsing ended... wtf?
* Parsing ended... wtf?
* $ node -v
* v0.6.12
* $ :(
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment