Open hushaudio opened 3 years ago
You also need to go refacter parser.js to require the utils file in the constructor so you can pass the options, and change utils to this.utils like so ->
This is important for storing feed data into mongodb as the default attrKey is $ which is a reserved key in mongodb
Forked it
the function getLink does not use the attrkey specified in xml2json. You need to pass these options to this function or setting attrkey will break the parser. I have created a new version of utils.js that sets module.exports to a function with the argument of (options) that can be passed in require('utils')(options)
This fixes it if you refacter the getLink function to use the attrKey options