rss-parser
Advanced tools
Comparing version 3.7.0 to 3.7.1
@@ -52,2 +52,4 @@ import { Options } from 'xml2js'; | ||
explicit?: string; | ||
categories?: string[]; | ||
keywords?: string[]; | ||
}; | ||
@@ -54,0 +56,0 @@ } |
@@ -225,2 +225,3 @@ "use strict"; | ||
entry = {}; | ||
let categories = []; | ||
feed.itunes = {} | ||
@@ -251,2 +252,11 @@ | ||
if(channel['itunes:category']) { | ||
channel['itunes:category'].forEach((category) => { | ||
categories.push(category.$.text); | ||
}); | ||
feed.itunes.categories = categories; | ||
} | ||
if(channel['itunes:keywords']) { | ||
feed.itunes.keywords = channel['itunes:keywords'][0].split(","); | ||
} | ||
utils.copyFromXML(channel, feed.itunes, fields.podcastFeed); | ||
@@ -253,0 +263,0 @@ items.forEach((item, index) => { |
{ | ||
"name": "rss-parser", | ||
"version": "3.7.0", | ||
"version": "3.7.1", | ||
"main": "index.js", | ||
@@ -20,3 +20,3 @@ "types": "index.d.ts", | ||
"mocha": "^5.2.0", | ||
"puppeteer": "^1.8.0", | ||
"puppeteer": "^1.16.0", | ||
"webpack": "^3.12.0" | ||
@@ -23,0 +23,0 @@ }, |
@@ -224,2 +224,10 @@ "use strict"; | ||
}); | ||
it('should parse itunes categories', function(done) { | ||
testParseForFile('itunes-category', 'rss', done); | ||
}); | ||
it('should parse itunes keywords', function(done) { | ||
testParseForFile('itunes-keywords', 'rss', done); | ||
}); | ||
}) |
4325868
65
26125