-
Notifications
You must be signed in to change notification settings - Fork 168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reasonable handler for unversioned/ill-versioned RSS feeds #186
Comments
Maybe one could think of a heuristic to determine which version the feed uses? |
I simply wrote a small fixup DOM procedure that appends the latest version to the rss element if this attribute is absent. |
Hi @kzn, ROME was designed not to handle broken feeds. I don't know whether we really should implement such a fallback mechanism. When we implement such a functionality it should not be enabled by default. Either the user has to handle such errors explicitly or to enable this mechanism with a setting, configuration flag or something else. Regards, |
I'm inclined to disagree. Some parts of Rome have intentionally been designed to handle brokenness. Namely In general I think Rome should be as lenient as possible, because our users usually have no control over the feeds they parse. Unlike databases or compilers where the user has no excuse to keep things broken. |
I think that the state of RSS is a bit similar to the HTML. There is a huge number of html pages that doensn't conform to the standard. Neverless, the browsers are able to handle them and show to the user. I had similar experience with RSS feeds. Some of them are perfectly handled by RSS readers, while wouldn't parse with ROME. |
Imho ROME should be as lenient as possible for the reasons @mishako and @kzn stated. I'd rather have ROME extract as much information as possible out of a feed instead of giving up, or even withholding information it could parse but decides not to because the feed does not conform to the standard. If you want to make a user aware of a broken feed I'd prefer it's done in a way, that still allows parsing. |
@PatrickGotthard Any thoughts? |
This is now partially fixed by #274. I say partially because the fix doesn't cover feeds with an incorrect version. Anyway, it's something. |
@kzn Rome 1.6.0 has been released with this issue fixed (or, as I said earlier, partially fixed). |
Currently, when ROME tries to parse RSS feed it tries different parsers based on version attribute of rss tag, but some feed don't provide one, or provide some non-standard version.
May be add some reasonable default parser for that kind of feeds. Assuming for example, if the version of the feed couldn't be determined, then try the parser for latest version?
The text was updated successfully, but these errors were encountered: