Skip to content

Instantly share code, notes, and snippets.

@fschwiet
Last active December 18, 2015 15:19
Show Gist options
  • Save fschwiet/5803151 to your computer and use it in GitHub Desktop.
Save fschwiet/5803151 to your computer and use it in GitHub Desktop.
feedparser repro
var FeedParser = require('feedparser'), request = require('request'), endpoint = require('endpoint');
function runOne(url) {
console.log("starting " + url);
request(url, function(error, response, body) {
if (error !== null) {
console.log("error A " + error);
console.log("done with " + url);
}
})
.pipe(new FeedParser({}))
.pipe(endpoint({objectMode: true}, function (err, results) {
if (err !== null) {
console.log("err", err);
}
console.log("done with " + url);
}));
}
runOne('http://cnn.com');
runOne('http://feeds.feedburner.com/mostlylucid/XRDO');
console.log("this line never runs.");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment