danmactough / node-feedparser

Robust RSS, Atom, and RDF feed parsing in Node.js
Other
1.97k stars 192 forks source link

Error: Not a feed for valid rss feed #150

Closed Nedudi closed 8 years ago

Nedudi commented 8 years ago

hi, I got this error

[Error: Not a feed] Error: Not a feed

for valid rss feed http://html5.by/feed/

I checked with validator and it seems ok
http://feedvalidator.org/check.cgi?url=http%3A%2F%2Fhtml5.by%2Ffeed%2F

Please help, thanks in advance

Feedparser v1.1.3 Node v0.12.0

danmactough commented 8 years ago

Hi, @Nedudi - That usually would mean the feed is being served in some compressed format. See this example for dealing with that: https://github.com/danmactough/node-feedparser/blob/master/examples/compressed.js

Nedudi commented 8 years ago

Just amazing! Thanks a lot! solved working as a dream

danmactough commented 8 years ago

🎉

yPhil-gh commented 5 years ago

This solved most of my problems, and 99% of my feeds work now :1st_place_medal: but sadly and inexplicably, it broke one of my favourites: https://dangerousminds.net/atom :(

Here is the code and the output:


0|petrolet | 2019-01-15 18:27: Error: Not a feed
0|petrolet |     at FeedParser.handleEnd (/home/px/src/petrolette/node_modules/feedparser/lib/feedparser/index.js:120:13)
0|petrolet |     at emitNone (events.js:105:13)
0|petrolet |     at SAXStream.emit (events.js:207:7)
0|petrolet |     at SAXParser.SAXStream._parser.onend (/home/px/src/petrolette/node_modules/sax/lib/sax.js:190:10)
0|petrolet |     at emit (/home/px/src/petrolette/node_modules/sax/lib/sax.js:624:35)
0|petrolet |     at end (/home/px/src/petrolette/node_modules/sax/lib/sax.js:667:5)
0|petrolet |     at SAXParser.end (/home/px/src/petrolette/node_modules/sax/lib/sax.js:154:24)
0|petrolet |     at SAXStream.end (/home/px/src/petrolette/node_modules/sax/lib/sax.js:248:18)
0|petrolet |     at FeedParser._flush (/home/px/src/petrolette/node_modules/feedparser/lib/feedparser/index.js:1128:17)
0|petrolet |     at FeedParser.<anonymous> (/home/px/src/petrolette/node_modules/readable-stream/lib/_stream_transform.js:138:49) 'Error: Not a feed\n    at FeedParser.handleEnd (/home/px/src/petrolette/node_modules/feedparser/lib/feedparser/index.js:120:13)\n    at emitNone (events.js:105:13)\n    at SAXStream.emit (events.js:207:7)\n    at SAXParser.SAXStream._parser.onend (/home/px/src/petrolette/node_modules/sax/lib/sax.js:190:10)\n    at emit (/home/px/src/petrolette/node_modules/sax/lib/sax.js:624:35)\n    at end (/home/px/src/petrolette/node_modules/sax/lib/sax.js:667:5)\n    at SAXParser.end (/home/px/src/petrolette/node_modules/sax/lib/sax.js:154:24)\n    at SAXStream.end (/home/px/src/petrolette/node_modules/sax/lib/sax.js:248:18)\n    at FeedParser._flush (/home/px/src/petrolette/node_modules/feedparser/lib/feedparser/index.js:1128:17)\n    at FeedParser.<anonymous> (/home/px/src/petrolette/node_modules/readable-stream/lib/_stream_transform.js:138:49)'

EDIT : Wait, I think it's a redirect PB (when you click on the URL, and give the new URL to FeedPArser, it actually works fine) ; I'm going to try to work this around.

rdbcci commented 5 years ago

I am somewhat familiar with that feed and it does redirect to: http://feeds.feedburner.com/dangerousminds/dot/net The above feed works fine for me. No problems with either the request or the parse.