fetch-site-rss

1.0.0 • Public • Published

fetch-site-rss

Fetch a site's RSS feed.

Why?

... because you only know a site's homepage (ie: http://nytimes.com), but you want to fetch that site's RSS feed. Basically just a cheap wrapper around cheerio and simple-rss.

Installation:

$ npm i fetch-site-rss -S

Usage:

const { getSiteRss } = require('fetch-site-rss');
 
getSiteRss('http://latimes.com')
  .then((feed) => {
    console.log(`Found ${feed.items.length} items:`);
    feed.items.forEach((item) => {
      console.log(`${item.title}\n${item.permalink || item.link || item['rss:link']['#']}\n`);
    })
  })
  .catch((err) => console.error(err.message));

Readme

Keywords

Package Sidebar

Install

npm i fetch-site-rss

Weekly Downloads

0

Version

1.0.0

License

WTFPL

Last publish

Collaborators

  • pdehaan