You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using parseUrl, under Firefox I get successfully a proper JS feed object.
Using the same code and same external URL on Chrome I get the following error:
sax.js?a9cf:651 Uncaught (in promise) Error: Unexpected close tag
Line: 9
Column: 7
Char: >
at error (sax.js?a9cf:651)
at strictFail (sax.js?a9cf:677)
at closeTag (sax.js?a9cf:871)
at SAXParser.write (sax.js?a9cf:1436)
at Parser.exports.Parser.Parser.parseString (parser.js?28dc:322)
at Parser.eval [as parseString] (parser.js?28dc:5)
at eval (parser.js?a485:32)
at new Promise ()
at Parser.parseString (parser.js?a485:31)
at exports.IncomingMessage.eval
Well, turns out the issue is unrelated to this plugin, but some might be interested in the solution: for Chrome you need to append '?format=xml' at the end of the URL. Some RSS sources have both a HTML version, for having a styled view in a browser, and a XML version. Chrome won't interpret the URL as XML without appending '?format=xml'
Using parseUrl, under Firefox I get successfully a proper JS feed object.
Using the same code and same external URL on Chrome I get the following error:
The rss feed used is : https://cors-anywhere.herokuapp.com/http://feeds.foxnews.com/foxnews/most-popular
Further used: node 10, rss-parser 3.7.0
The used code is nothing far from the provided example in the docs:
BreakingNewsService.prototype.fetchRSS = function (feedUrl) { return new Promise((resolve, reject) => { console.log(feedUrl) parser.parseURL(feedUrl) .then((feed) => { console.info('NewsfeedObject', feed) resolve(feed) }) .catch((err) => { reject(err) }) }) }
Any idea what may be causing this?
The text was updated successfully, but these errors were encountered: