Skip to content

Commit 187e365

Browse files
committed
Catch for old RSS structure
1 parent 73ba422 commit 187e365

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Parser.parseString = function(xml, callback) {
2121
XML2JS.parseString(xml, function(err, result) {
2222
if (err) throw err;
2323
var json = {feed: {entries: []}};
24-
var channel = result.rss.channel[0];
24+
var channel = result.feed || result.rss.channel[0];
2525
if (channel['atom:link']) json.feed.feedUrl = channel['atom:link'][0].href;
2626
TOP_FIELDS.forEach(function(f) {
2727
if (channel[f]) json.feed[f] = channel[f][0];

0 commit comments

Comments
 (0)