w3stling / rssreader

A simple Java library for reading RSS and Atom feeds
MIT License
152 stars 25 forks source link

Add info about image into rss item. #154

Closed logart closed 5 months ago

logart commented 5 months ago

Hi, @w3stling

I really appreciate your library since it saved me a lot of time and I really like the extension points with addItemExtension API. However, for my project I needed to parse media:thumbnail attribute of the rss feed. Of course I could parse it into author or comments field as a hack like this .addItemExtension("media:thumbnail", "url", Item::setAuthor), but I would rather contribute to the library to add additional image field on the rss Item class.

If you don't mind, I've added the default behaviour to abstract parser so it will work out of the box. But if this is inapropriate, I can happily use .addItemExtension("media:thumbnail", "url", Item::setImage) in my code.

Let me know if you could accept my PR as is, or should I remove default behaviour from abstact parser and only add an image field on the item class.

I wish you have a best day, Artem

logart commented 5 months ago

I've opened another PR #155 , I needed it so I can push to master and not update this PR.