How to parse rss feed data from a node-fetch promise (ES6)
xardit opened this issue · 1 comments
xardit commented
Since i'm using a different tool like node-fetch, how do i parse the response data to feedparser, there isn't any example at all.
I use the code like this:
fetch(url, params)
.then(response=>{
// code to parse the xml data sing node-feedparser
})
.catch(err=>console.log(err))
Any example is appreciated
danmactough commented
@a3diti You should check out the fetch docs. You can get the response body as a ReadableStream
and pipe it to feedparser like the examples demonstrate.