Created
March 6, 2012 02:29
-
-
Save oz/1982977 to your computer and use it in GitHub Desktop.
Apparently a bug in feedme.js parser events
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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