Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

get-rss-atom

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-rss-atom

Reed feed content from URL and return Array with Objects

  • 1.0.6-d
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
35
increased by3400%
Maintainers
1
Weekly downloads
 
Created
Source

Simple RSS/ATOM feed parser.

getRssAtom(url, callback) returns a callback with an object:

{
    title: String,
    items: Array [
        {
            title: String,
            content: String,
            href: String
        },
        ...
    ]
}

Install

npm init
npm install --save get-rss-atom

Usage

For example, create reader.js

'use strict';

const reader = require('get-rss-atom');

let
    count = 0,
    feedUrl = '';

if (process.argv.length > 2) {
    feedUrl = process.argv[2]
} else {
    console.error('Please specify an RSS URL.');
    process.exit(1)
}

reader.getRssAtom(feedUrl, feed => {
    console.log(`\n${feed.title}\n`);
    feed.items.forEach((item) => {
        count++;
        console.log(`\n--${count}-- ${item.title}\n${item.content}\n${item.href}\n`)
    }
)});

Run

node reader http://www.at5.nl/feeds/at5/nieuws/V100/nieuws

FAQs

Package last updated on 31 Aug 2017

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc