I am trying to write a small RSS Reader. I use ROME in order to get the RSS feeds. This works fine so far. However, I am not able to obtain the RSS icon of the individual feeds. Is there a way to get the icon (e.g. the URL) via ROME or does anybody know an easy way to achieve this through java without ROME?
Share
The favicon.ico is almost always in the root of the host, for example, for stackoverflow’s you can go here: https://stackoverflow.com/favicon.ico and get redirected to the icon. Sometimes, RSS feeds are actually hosted on a different service (like google or feedburner) than the site itself (where all the RSS items are), so you need to access the
<link>element to get the host, then simply access the host’s favicon.ico.Example, over at Crunchy Roll, they use feed burner and the RSS feed looks something like this:
So if you have a
SyndEntry,This may not always work, although sites really should be putting favicon.ico in their document root, some sites may use a
<link>tag within the page, something like:To indicate that for a given page, to use this other favicon. This doesn’t necessarily mean there isn’t a favicon,ico sitting at the document root, just that for this link, to use this icon. So if you want to take the extra steps, you can insert these steps between 1. and 2. above:
<link rel="shortcut icon">in the header