Open azmeuk opened 5 years ago
Could you please give us a short description about what MediaRSS is for. Maybe a real use case would improve the understanding.
Of course. Media-RSS is used to describe medias, such as audio or video files, and their metadata (thumbnails, description, number of views/listening, rating, links to read the media in different format etc.)
It is used in every youtube feeds (example) or peertube feeds (example though support should improve in an upcoming version).
I have the same issue , did you solve it?
Actually this would take some time to fix. I am willing to do a patch, but I would like to be sure that it will merged in the end before I start.
@kurtmckee What do you think?
This is something we are very interested in as well, especially when it comes to children in media:content
, such as media:title
(i.e. associating e.g. image titles with the images themselves).
I have started work on a patch but the changes are breaking at this time (see example below).
Main changes:
media:group
(not part of below example) and media:content
are now containers as expected. media:group
may contain media:content
s.media:{x}
now generates media_{x}
keys instead of {x}
keys. The keys previously known as media_{x}
are now known as media_{x}_details
(this is mainly to make tags distinguishable from attributes of the parent media:{x}
)media:title
is no longer used as a fallback for a missing title
(consequence of 2. above. Fixable but probably violating expectations?)Any thoughts on these changes and how they affect the parsed data?
@azmeuk Is this in line with what you had in mind or were you planning on something different?
@kurtmckee Is this in line with the project as a whole?
Hello, I noticed some issues with the media-rss implementation. Before trying to fix them, I would like to discuss it here.
According to the Media-RSS specification, the
<media:group>
tag is used to group several links/representation for a same media. However, my understanding is that feedparser just ignores this tag, and consider every<media:content>
as a new media.https://github.com/kurtmckee/feedparser/blob/d12d3bdd075bca71885ccb02e9b08ac04fcb8514/feedparser/namespaces/mediarss.py#L64-L66 https://github.com/kurtmckee/feedparser/blob/d12d3bdd075bca71885ccb02e9b08ac04fcb8514/feedparser/namespaces/mediarss.py#L119-L122
The description is set on the feed entry
The <media:description> tag belongs to the media, but feedparser updates the feed entry description.
https://github.com/kurtmckee/feedparser/blob/d12d3bdd075bca71885ccb02e9b08ac04fcb8514/feedparser/namespaces/mediarss.py#L91-L95
Some tags are missing
For instance, the <media:subtitle> tag is not handled by feedparser.
Attributes are ignored
When tags are handled, a lot of the attributes in the Media-RSS specification are just ignored. For instance,
<media:description>
can either be plain text or html but feedreader does not make a difference.So...
I would like to tackle this issues, but there could be some backward compatibility problems. How can I manage this? I believe Media-RSS is not much used, and the simpler option for me is just to break the compatibility so feedparser can correctly respect the specification. What do you think?