rss-parser
Advanced tools
Comparing version 2.11.0 to 2.12.0
@@ -139,2 +139,8 @@ 'use strict'; | ||
var parseRSS_9 = function(xmlObj, options, callback) { | ||
var channel = xmlObj.rss.channel[0]; | ||
var items = channel.item; | ||
return parseRSS(channel, items, options, callback); | ||
} | ||
var parseRSS1 = function(xmlObj, options, callback) { | ||
@@ -274,2 +280,4 @@ xmlObj = xmlObj['rdf:RDF']; | ||
return parseRSS1(result, options, callback); | ||
} else if (result.rss && result.rss.$.version && result.rss.$.version.match(/0\.9/)) { | ||
return parseRSS_9(result, options, callback); | ||
} else { | ||
@@ -276,0 +284,0 @@ return callback(new Error("Feed not recognized as RSS 1 or 2.")) |
{ | ||
"name": "rss-parser", | ||
"version": "2.11.0", | ||
"version": "2.12.0", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -68,2 +68,6 @@ "use strict"; | ||
it('should parse heraldsun', function(done) { | ||
testParseForFile('heraldsun', 'rss', done); | ||
}) | ||
it('should parse Instant Article', function(done) { | ||
@@ -70,0 +74,0 @@ testParseForFile('instant-article', 'rss', done); |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
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
3901192
51
24499