It parses an Atom/RSS feed and de-cluters the article objects to return a simple array of articles.
npm install feed-parserFeed Parser
===================
It parses a Atom/RSS feed and de-clutters the article objects to return a simple array of articles.
``bash`
npm install feed-parser --save
`js
var feedParser = require('feed-parser');
/**It exposes a function called parse.
@feedURL: The URL of the Atom/RSS feed,
@callbackFunction: This function will be called with the array of articles after successful execution.
Use a try-catch block to catch for any errors.
*/
try {
feedParser.parse(feedURL, callbackFunction);
} catch(error) {
console.log(error)
}
`
It returns an array of articles which have five entries.
`bash`
>[{title:"TITLE OF THE POST",description:"DESCRIPTION OF THE POST",
date:"DATE OF PUBLISHING",image:"IMAGE URL FOR THUMBNAIL",
author:"AUTHOR'S NAME"}, ...//Other entries]
1. Clone this repository.
2. Install required modules.
>`bash``
>cd feed-parser
>npm install
>
-> Start Hacking.
Issue a Pull request to the development branch.
Github: Feed Parser