feedparser
Advanced tools
Comparing version 0.9.2 to 0.9.3
/********************************************************************** | ||
node-feedparser - Really Simple RSS, a robust RSS, Atom, RDF parser for node. | ||
node-feedparser - A robust RSS, Atom, RDF parser for node. | ||
http://github.com/danmactough/node-feedparser | ||
@@ -451,3 +451,3 @@ Copyright (c) 2011 Dan MacTough | ||
self.saxStream = require('sax').createStream(false, {lowercasetags: true}); // https://github.com/isaacs/sax-js | ||
self.saxStream.on('error', function (e){ self.handleError(e, self) }); | ||
self.saxStream.on('error', function (e){ self.handleSaxError(e, self) }); | ||
self.saxStream.on('opentag', function (n){ self.handleOpenTag(n, self) }); | ||
@@ -513,3 +513,5 @@ self.saxStream.on('closetag', function (el){ self.handleCloseTag(el, self) }); | ||
self._reset(callback); | ||
self.saxStream.end(string, 'utf8'); | ||
self.saxStream | ||
.on('error', function (e){ self.handleError(e, self); }) | ||
.end(string, 'utf8'); | ||
}; | ||
@@ -532,3 +534,5 @@ | ||
self._reset(callback); | ||
fs.createReadStream(file).pipe(self.saxStream); | ||
fs.createReadStream(file) | ||
.on('error', function (e){ self.handleError(e, self); }) | ||
.pipe(self.saxStream); | ||
} | ||
@@ -553,3 +557,5 @@ }; | ||
self._reset(callback); | ||
request(url).pipe(self.saxStream); | ||
request(url) | ||
.on('error', function (e){ self.handleError(e, self); }) | ||
.pipe(self.saxStream); | ||
}; | ||
@@ -576,3 +582,5 @@ | ||
self._reset(callback); | ||
stream.pipe(self.saxStream); | ||
stream | ||
.on('error', function (e){ self.handleError(e, self); }) | ||
.pipe(self.saxStream); | ||
}; | ||
@@ -601,2 +609,11 @@ | ||
FeedParser.prototype.handleSaxError = function (e, scope){ | ||
var self = scope; | ||
self.handleError(e, self); | ||
if (self._parser) { | ||
self._parser.error = null; | ||
self._parser.resume(); | ||
} | ||
}; | ||
FeedParser.prototype.handleError = function (e, scope){ | ||
@@ -606,4 +623,2 @@ var self = scope; | ||
self.errors.push(e); | ||
self._parser.error = null; | ||
self._parser.resume(); | ||
}; | ||
@@ -610,0 +625,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Robust RSS, Atom, and RDF feed parsing using sax js", | ||
"version": "0.9.2", | ||
"version": "0.9.3", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
823
37335
7