danmactough / node-feedparser

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

description vs. summary #156

Closed erkattak closed 6 years ago

erkattak commented 8 years ago

It's said in main.js that each article in a feed will have description and summary https://github.com/danmactough/node-feedparser/blob/master/main.js#L26-L27

However, the code seems to be taking the actual XML summary element and putting it's value into description.

Also, if content:encoded and description exist within the same item, then whichever one is parsed last will take precedence.

https://github.com/danmactough/node-feedparser/blob/master/main.js#L762-L770

danmactough commented 8 years ago

That's correct. summary and content come from Atom format; description from RSS; content:encoded from the RDF content module. The idea of this module to offer a consistent set of properties modeled mostly after the RSS spec. So, if you're looking for the simplest available representation of the main content of an item, it will be in the summary, and the richest available representation will be in the description -- but those might be the same (as would be the case in a plain-jane RSS feed).