All Projects → jameslawler → react-native-rss-parser

jameslawler / react-native-rss-parser

Licence: MIT license
React Native compatible package to parse RSS feeds

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to react-native-rss-parser

vue-rss-feed
Embed RSS Feeds in your Vue web app
Stars: ✭ 37 (-51.32%)
Mutual labels:  rss, rss-parser
Feedjira
A feed parsing library
Stars: ✭ 2,017 (+2553.95%)
Mutual labels:  rss, rss-parser
buran
Bidirectional, data-driven RSS/Atom feed consumer, producer and feeds aggregator
Stars: ✭ 27 (-64.47%)
Mutual labels:  rss, rss-parser
tidyRSS
An R package for extracting 'tidy' data frames from RSS, Atom, JSON and geoRSS feeds
Stars: ✭ 62 (-18.42%)
Mutual labels:  rss, rss-parser
django-feed-reader
An RSS/Atom/JSONFeed reading + storing library for Django
Stars: ✭ 21 (-72.37%)
Mutual labels:  rss
docker-ttrss
Tiny Tiny RSS feed reader as a Docker image.
Stars: ✭ 55 (-27.63%)
Mutual labels:  rss
bye-bye-feedly
Export your read later (formerly saved/favorited) articles from feedly, and access them from a simple reader.
Stars: ✭ 42 (-44.74%)
Mutual labels:  rss
miniflux-sidekick
A sidekick for Miniflux, filter out items by regex or tags. Compatible with killfiles. 🔪
Stars: ✭ 34 (-55.26%)
Mutual labels:  rss
banditore
Banditore retrieves new releases from your starred GitHub repositories and generate an Atom feed with them.
Stars: ✭ 118 (+55.26%)
Mutual labels:  rss
rss
RSS订阅插件 for Hoshinobot
Stars: ✭ 28 (-63.16%)
Mutual labels:  rss
FeedReader
C# RSS and ATOM Feed reader library. Supports RSS 0.91, 0.92, 1.0, 2.0 and ATOM. Tested with multiple languages and feeds.
Stars: ✭ 221 (+190.79%)
Mutual labels:  rss
simplepie-ng
Don't use this yet.
Stars: ✭ 41 (-46.05%)
Mutual labels:  rss
Tweet-2-RSS
Convert your Twitter API requests to RSS Feeds
Stars: ✭ 14 (-81.58%)
Mutual labels:  rss
Gofr
Feed Reader for App Engine (Google Reader clone)
Stars: ✭ 53 (-30.26%)
Mutual labels:  rss
Pentest-Bookmarkz
A collection of useful links for Pentesters
Stars: ✭ 118 (+55.26%)
Mutual labels:  rss
github-issues-rss
convert github issues to rss
Stars: ✭ 25 (-67.11%)
Mutual labels:  rss
loread
RSS Android client,support Inoreader, Feedly, TinyTinyRSS, Fever。
Stars: ✭ 60 (-21.05%)
Mutual labels:  rss
rss-finder
Find rss feeds url
Stars: ✭ 62 (-18.42%)
Mutual labels:  rss
feed2maildir
📬 Read RSS/Atom feeds in your favourite, maildir-compatible email client.
Stars: ✭ 15 (-80.26%)
Mutual labels:  rss
rss-for-the-rest-of-us
A simple RSS reader built on Laravel. For the rest of us.
Stars: ✭ 16 (-78.95%)
Mutual labels:  rss

react-native-rss-parser

React Native compatible RSS parser

npm version Build Status

Parse RSS data into a simple object structure. Currently supports;

  • RSS 2.0 specification
  • Atom 1.0 specification
  • Itunes elements for both RSS 2.0 and Atom 1.0 feeds

Installation

npm install react-native-rss-parser --save

Usage example

import * as rssParser from 'react-native-rss-parser';

return fetch('http://www.nasa.gov/rss/dyn/breaking_news.rss')
  .then((response) => response.text())
  .then((responseData) => rssParser.parse(responseData))
  .then((rss) => {
    console.log(rss.title);
    console.log(rss.items.length);
  });

Parsed model

{
  type: undefined,            // either `rss-v2` or `atom-v1`
  title: undefined,           // title of the channel
  links: [{
    url: undefined,           // url of the channel
    rel: undefined            // type of url (eg. alternate)
  }],
  description: undefined,     // description of the channel
  language: undefined,        // language of the channel in `en-us`
  copyright: undefined,       // copyright information about the channel
  authors: [{
    name: undefined           // channel author names
  }],
  lastUpdated: undefined,     // last updated date for the channel
  lastPublished: undefined,   // last published date for the channel
  categories: [{
    name: undefined           // categories the channel belong too
  }],
  image: {
    url: undefined,           // channel image url
    title: undefined,         // channel image title
    description: undefined,   // channel image description
    width: undefined,         // channel image width (pixels)
    height: undefined         // channel image height (pixels)
  },
  itunes: {                   // itunes specific channel information
    author: [{
      name: undefined         // channel author names
    }],
    block: undefined,         // if `yes` then the entire podcast isn't shown in iTunes directory
    categories: [{
      name: undefined,        // channel category names
      subCategories:[{
        name: undefined       // sub category names
      }]
    }],
    image: undefined,         // channel image url
    explicit: undefined,      // `yes`/`no` to indicate if channel contains explicit content
    complete: undefined,      // `yes` indicates the feed won't publish any new items in the future
    newFeedUrl: undefined,    // a url pointing to the new feed location
    owner: {
      name: undefined,        // owner name of the channel
      email: undefined,       // owner email address of the channel
    },
    subtitle: undefined,      // sub title of the channel
    summary: undefined,       // summary of the channel
  },
  items: [{                   // list of items in the feed
    id: undefined,            // item id
    title: undefined,         // item title
    imageUrl: undefined,      // item image url
    links: [{
      url: undefined,         // item link url
      rel: undefined          // type of item link
    }],
    description: undefined,   // item description
    content: undefined,       // item HTML content
    categories: [{
      name: undefined         // categories the item belongs too
    }],
    authors: [{
      name: undefined         // item author names
    }],
    published: undefined,     // item published date
    enclosures: [{
      url: undefined,         // item media url
      length: undefined,      // item media length (bytes)
      mimeType: undefined     // item media mime type (eg audio/mpeg)
    }],
    itunes: {                 // itunes specific item information
      authors: [{
        name: undefined,      // item author names
      }],
      block: undefined,       // `yes` indicates the item won't be displayed in the iTunes directory
      duration: undefined,    // HH:MM:SS length of the item
      explicit: undefined,    // `yes`/`no` to indicate if item contains explicit content
      image: undefined,       // image url for the item
      isClosedCaptioned: undefined, // `yes` indicates if the item contains closed captioning
      order: undefined,       // item order number
      subtitle: undefined,    // item subtitle
      summary: undefined,     // item summary
    }
  }]
}

Model mappings

Top Level elements

Parsed Value RSS v2.0 Atom v1.0
title title title
links link link
description description subtitle
language language
copyright copyright rights
authors managingEditor author
published pubDate published
updated lastBuildDate updated
categories category category
image image logo
items item entry

Item / Entry Level elements

Parsed Value RSS v2.0 Atom v1.0
id guid id
title title title
imageUrl icon
links link link
description description summary
content content:encoded content
categories category / dc:subject category
authors author / dc:creator contributor
published pubDate / dc:date published
enclosures enclosures link

CHANGELOG

1.5.1

  • Bug Fix: _this.getElementTextContentArray is not a function issue #16 (thanks to julianbragachi)

1.5.0

  • Updated xmldom to version 0.3.0
  • Change tests to use Jest to ensure refactoring did not break anything (using snapshot tests)
  • Updated entire codebase to use up-to-date JavaScript syntax (arrow functions, const & let instead of var)
  • Bug Fix: Atom v1 should return published date when no updated date available (thanks to Serra19)

Development setup

Clone this project from GitHub

npm install
npm test

Bugs / feature requests

If you find any bugs or have a feature request, please create an issue in GitHub.

Contributing

  1. Fork it (https://github.com/jameslawler/react-native-rss-parser)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

License

Distributed under the MIT license. See LICENSE for more information.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].