cardmagic / simple-rss

A simple, flexible, extensible, and liberal RSS and Atom reader for Ruby. It is designed to be backwards compatible with the standard RSS parser, but will never do RSS generation.
https://github.com/cardmagic/simple-rss
Other
225 stars 68 forks source link

Entry/Item level attributes #7

Open markmcspadden opened 13 years ago

markmcspadden commented 13 years ago

I needed the ability to grab attributes off the entry or item tag...and as far as I could tell there isn't currently a way to do this. I've added the change needed and tests behind it. (Let me know if you'd like me to move my tests from their own file back into base_test.)

I'm not sure if such a thing is needed by anybody else...or if it's even in spec for atom/rss, but I'm aggregating some Google Reader Shared feeds, and they have them and I need them. (Example: http://www.google.com/reader/public/atom/user/13184750814515218749/state/com.google/broadcast)

Tested on Ruby 1.8.7p174. Thx.

poprygun commented 12 years ago

Any chance to add same functionality on feed level in addition to item level? I have quiet a few instances where I need to parse channel attributes. Many thanks, Alex