-
Notifications
You must be signed in to change notification settings - Fork 162
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
Produced feed is not valid when entry has header image #92
Comments
So, where will header image go if we remove |
Apparently, the two most common ways of including an image for a feed's item are:
However, for the first alternative one would need to specify the MIME type, which given the current implementation, results in a "None" value, and a valid The second alternative, instead, allows to just specify the image's source URL without having to worry about the length of the file, whose calculation might require additional processing. I can implement any of the two. What do you think @marctc ? |
To be honest, I don't have the enough RSS knowledge to make this decission. So if any of the implementations work choose whatever solution you think will work better. thanks! |
it seems that because of this method https://github.com/APSL/puput/blob/master/puput/feeds.py#L48
the produced RSS feed contains an
enclosure
element, which is invalid because it's lacking thelength
andtype
fields which are required (https://validator.w3.org/feed/docs/rss2.html)To my understanding the
enclosure
element is only useful for media that has a length, e.g. audio or video, but not for images, therefore my proposed solution would be to remove this method altogether.I can work on a PR if this sounds reasonable
The text was updated successfully, but these errors were encountered: