rss-parser
rss-parser copied to clipboard
Consecutive calls with url pointing to non-rss url give different errors
Hi,
I was writing tests and by accident discovered that I get two different error results for the same URL if I run the parseURL consecutively.
Code to reproduce:
const Parser = require('rss-parser');
const parser = new Parser();
const url = 'https://soundcloud.com/inspected';
(async () => {
try {
await parser.parseURL(url);
} catch (error) {
console.log(error);
}
try {
await parser.parseURL(url);
} catch (error) {
console.log(error);
}
})();
Output received:
Error: Invalid character in entity name
Line: 52
Column: 139
Char: &
and
Error: Feed not recognized as RSS 1 or 2.
Expected would be to get second error in both cases.
That is very weird. Maybe a caching thing?