rss-parser icon indicating copy to clipboard operation
rss-parser copied to clipboard

Add `parseBuffer` method

Open paya-cz opened this issue 2 years ago • 1 comments

My RSS feed has encoding="ISO-8859-1" in the header. I cannot use parser.parseURL because I need to implement custom error handling and rate limiting. The only alternative is using parser.parseString, but to use it I would need to already have a decoded string. I only have a Buffer with unknown encoding, and I would like to pass it to rss-parser to decode. I think a new function parser.parseBuffer would be appropriate for this task, and I imagine it can share a lot of code with parser.parseURL.

paya-cz avatar Nov 15 '21 16:11 paya-cz

👍 this seems like a great idea!

rbren avatar Jan 14 '22 14:01 rbren