works!

is it identical to this one? if not, what is the difference?

request(reqObj, function (err, response, body){
  feedparser.parseString(body)
    .on('article', callback);});


On Tuesday, March 19, 2013 1:11:40 PM UTC-7, Dan MacTough wrote:
>
> Josh, sorry about the outdated documentation. The pipe method doesn't work 
> anymore. I've updated the README.
>
> I still encourage you to try using streams (although I haven't had a 
> chance to update to streams2 yet).
>
> The correct method would be:
>
> feedparser.parseStream(request({ 'uri': 'http://substack.net/blog.xml' }))
>   .on('article', function (article) {
>     //do something
>   });
>
> -Dan
>
> On Tuesday, March 19, 2013 12:51:58 AM UTC-4, josh wrote:
>>
>> this is almost  a copy paste from feedparser readme.
>> I know I miss something but not sure what it is.
>>
>> var request = require('request');
>> var feedparser = require('feedparser');
>>
>> request({ 'uri': 'http://substack.net/blog.xml' 
>> }).pipe(feedparser.stream);
>>
>> stream.js:52
>>   dest.on('drain', ondrain);
>>        ^
>> TypeError: Cannot call method 'on' of undefined
>>     at Request.Stream.pipe (stream.js:52:8)
>>
>

-- 
-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
You received this message because you are subscribed to the Google
Groups "nodejs" group.
To post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

--- 
You received this message because you are subscribed to the Google Groups 
"nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to nodejs+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to