filipedeschamps / rss-feed-emitter

Super RSS News Feed aggregator written in Node.js and ES6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

unable to parse urls with parameters.

sridharjsharma opened this issue · comments

Hi @filipedeschamps ,
I'm a newbie with rss/xml parsers.... I'm trying to parse the rss feed, but getting error as below, request your help on where am I going wrong...

ERROR:

..\node_modules\rss-feed-emitter\dist\rss-feed-emitter.js:224
        throw {
        ^
[object Object]

CODE:

var RssFeedEmitter =  require('rss-feed-emitter');
var feeder = new RssFeedEmitter();
var feedUrl = 'http://articlefeeds.nasdaq.com/nasdaq/categories?category=Stocks';

feeder.add({ feedUrl, refresh: 10000 });

feeder.on('new-item', function (item) {
    console.log(item);
});
feeder.list();

Thanks a lot,
sjs

I would love to fix this, and I got a challenge for you :) which is write an integration (e2e) test to prove this broken behavior.

You can use the PR #168 as benchmark.

Remember, your tests should break 👍

Surely I need to write some UTs for my full package...
But caught the Issue in my code! it was somewhere in long my callback sequence...
Its working like Charm!!