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
Unexpected Author if itunes:owner is present #316
Comments
+1 to this one. In addition, the information from the author field seems to be completely gone - at least I can't find it anywhere. This seems like a bug given that data is lost. This is also not reflected in the documentation: https://feedparser.readthedocs.io/en/latest/reference-feed-author.html - no mention of the "owner" field there. |
@H4kor I don't think this is correct behavior, and @anula thanks for identifying the documentation deficiency with the current implementation! Before work is done on a patch, I'd like to get feedback about possible solutions. I don't think that the concept of an "owner" is addressed by any of the core specifications that feedparser already supports. Therefore there are several paths that could be taken:
The numbers of the ideas above don't indicate ordering of preference; they exist only for reference in conversation. Are there additional solutions? Are there any issues that would disqualify any of the possible solutions above? I'm very open to feedback. |
Hey, couple of thoughts. First, I would propose to implement (4) as a start and a minimum. I think dedicated "itunes" key would be useful for any further itunes specific attributes, should you want to expose more. On top of that, it would not break current behavior of those "itunes owners" not landing in Also, if you can stomach some more nesting, you could even consider something like And to complicate things a little bit further (but also, paradoxically, simplify things on the decisions level), feedparser could have a config switch that would turn on / off generalization from those "extensions" into the main attributes. That is, if I say nothing, then those "itunes owners" stay within Did I already mention that those specific merge heuristics could be configurable / extensible by feedparser users? :) Something like:
Default feedparser merging behavior would then also be implemented as such "merger" (not particularly fond of this naming, but that's my first hot take). |
When a feed has both
itunes:author
anditunes:owner
, the owner name is set as author.Feed:
Output:
Expected:
I can provide a patch, if this is something that should be changed. Just wanted to be sure this isn't intended behavior.
The text was updated successfully, but these errors were encountered: