2.0.1 • Published 6 years ago
feedparser-promised v2.0.1
feedparser-promised
Wrapper around feedparser with promises.
Install
  $ npm install --save feedparser-promisedUsage
  const feedparser = require('feedparser-promised');
  const url = 'http://feeds.feedwrench.com/JavaScriptJabber.rss';
  feedparser.parse(url).then(items =>
    items.forEach(item => console.log('title:', item.title));
  ).catch(console.error);Using HTTP Node.js options
const feedparser = require('feedparser-promised');
const httpOptions = {
  uri: 'http://feeds.feedwrench.com/JavaScriptJabber.rss',
  timeout: 3000,
  gzip: true,
  // ...
};
feedparser.parse(httpOptions).then(items => { /* do your magic here */ });Using Feedparser options
const feedparser = require('feedparser-promised');
const httpOptions = {
  uri: 'http://feeds.feedwrench.com/JavaScriptJabber.rss',
  // ...
};
const feedparserOptions = {
  feedurl: 'http://feeds.feedwrench.com/JavaScriptJabber.rss',
  normalize: false,
  addmeta: false,
  resume_saxerror: true
};
feedparser.parse(httpOptions, feedparserOptions).then(items => { /* do your magic here */ });List of article properties
title: titledescription: frequently, the full article contentsummary: frequently, an excerpt of the article contentlink: linkoriglink: when FeedBurner or Pheedo puts a special tracking url in thelinkproperty,origlinkcontains the original linkpermalink: when an RSS feed has aguidfield and theisPermalinkattribute is not set tofalse,permalinkcontains the value ofguiddate: most recent updatepubdate: original published dateauthor: authorguida unique identifier for the articlecomments: a link to the article's comments sectionimage:an Object containingurlandtitle` propertiescategories: an Array of Stringssource: an Object containingurlandtitleproperties pointing to the original source for an article; see the RSS Spec for an explanation of this elementenclosures: an Array of Objects, each representing a podcast or other enclosure and having aurlproperty and possiblytypeandlengthpropertiesmeta: an Object containing all the feed meta properties; especially handy when using the EventEmitter interface to listen toarticleemissions
Contributing
There are many ways to contribute, such as fixing opened issues, creating them or suggesting new ideas. Either way will be very appreciated.
If there are issues open, I recommend you follow those steps:
- Create a branch feedparser-promised#{issue_number}; eg: feedparser-promised#42
 - Please, remember to write unit tests.
 - Send a pull request!
 
Running Tests
$ npm testLicense
feedparser-promised is released under the MIT License.
2.0.1
6 years ago
2.0.0
7 years ago
1.5.0
8 years ago
1.4.2
8 years ago
1.4.1
8 years ago
1.4.0
8 years ago
1.3.0
8 years ago
1.2.2
9 years ago
1.2.1
9 years ago
1.2.0
9 years ago
1.1.3
9 years ago
1.1.2
9 years ago
1.1.1
9 years ago
1.1.0
9 years ago
1.0.4
9 years ago
1.0.3
9 years ago
1.0.2
9 years ago
1.0.1
10 years ago
1.0.0
10 years ago
0.0.3
10 years ago
0.0.2
10 years ago
0.0.1
10 years ago
0.0.0
10 years ago