rbren / rss-parser

A lightweight RSS parser, for Node and the browser
MIT License
1.38k stars 209 forks source link

Error: Unexpected close tag #214

Closed MorningSleeper closed 3 years ago

MorningSleeper commented 3 years ago

Hi, I am using 3.12.0. For the following feed:

https://www.benzinga.com/news/feed

It tests as a valid RSS feed but I am getting the following error using parseURL

Error: Unexpected close tag Line: 15 Column: 9 Char: >

My code

rssParser.parseURL(feedURL, function (error, results) {

});

In the feed returned at the time of this post, I think line 15 is below. I get the exact same error at other times and while line 15 is slightly different the 9th character, an encoded > is always the same.

<li>Air Liquide (France)</li>

Does anyone have any ideas on how I can resolve?

MorningSleeper commented 3 years ago

While awaiting a response, instead of using parseURL to get feed, I retrieved the RSS feed outside of rss-parser using got module and then used rss-parser's parseString on the result and it did not generate the reported error. Still curious to know why parseURL throws the error but parseString does not.

rbren commented 3 years ago

That's very strange. parseURL just has a thin wrapper around the http library

Since this is likely an issue with the underlying feed, I'm going to close this. But if you have any more info to share please update this thread!