Closed jonathan-chin closed 7 years ago
Hi, @jonathan-chin. Here's a great demo that should help you get started if you're still struggling.
The demo doesn't do what OP wants. It uses a callback to send all the accumulated data.
What OP (and I) am trying to do is something like:
fs.createReadStream('rss.xml').pipe(feedParser).pipe(process.stdout)
Because feedparser is a transform stream, I keep thinking this is possible, but I can't figure out how.
hey,
pardon my ignorance; I don't have much experience writing or coding with NodeJS streams. I want to use feedparser to pull a particular field from an rss feed (the uid the site generates for each article) and pipe that to another process. how can I do that?
I've tried using stream.emit and stream.write but I keep getting
TypeError: Invalid data, chunk must be a string or buffer, not object