Socket
Socket
Sign inDemoInstall

feed-read

Package Overview
Dependencies
49
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    feed-read

a ATOM and RSS feed parser


Version published
Weekly downloads
148
decreased by-29.19%
Maintainers
1
Install size
5.36 MB
Created
Weekly downloads
 

Readme

Source

Feed-Read

Node.js module for parsing RSS and ATOM feeds into a common article object.

Installation

$ npm install feed-read

Usage

var feed = require("feed-read");

feed(url, callback)

Fetch a feed.

feed("http://craphound.com/?feed=rss2", function(err, articles) {
  if (err) throw err;
  // Each article has the following properties:
  // 
  //   * "title"     - The article title (String).
  //   * "author"    - The author's name (String).
  //   * "link"      - The original article link (String).
  //   * "content"   - The HTML content of the article (String).
  //   * "published" - The date that the article was published (Date).
  //   * "feed"      - {name, source, link}
  // 
});

feed.rss(rss_string, callback)

Parse a string of XML as RSS.

The callback receives (err, articles).

feed.atom(atom_string, callback)

Parse a string of XML as ATOM.

The callback receives (err, articles).

feed.identify(xml_string) // => "atom", "rss", or false

Identify what type of feed the XML represents.

Returns false when it is neither RSS or ATOM.

License

See LICENSE.

Keywords

FAQs

Last updated on 19 Mar 2012

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc