fetch-site-rss
v1.0.0
Published
Fetch a site's RSS feed
Downloads
4
Readme
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));