feedparser icon indicating copy to clipboard operation
feedparser copied to clipboard

Fix: media element w/o duration would overwrite enclosure's length

Open onli opened this issue 1 year ago • 4 comments

I stumbled over a podcast feed that had both an enclosure and a media:content element, but the media element had no duration set. Feedparser would end up with an attachment that had a size element set to nil. That's problematic, especially since ruby's rss lib will not create the enclosure element without a length element (it is required by spec).

onli avatar Jul 02 '24 22:07 onli

thanks for the fix & update. i try to merge this summer (july / august). can you post the link to the podcast rss feed by any chance? i'd like to add as a test case. all (feedparser) tests are here -> https://github.com/rubycocos/feedparser/tree/master/feeds

geraldb avatar Jul 03 '24 11:07 geraldb

I will ask the user about the status of the feed link, whether it's private or not.

onli avatar Jul 03 '24 14:07 onli

It's a public feed, this one: https://www.omnycontent.com/d/playlist/e73c998e-6e60-432f-8610-ae210140c5b1/A91018A4-EA4F-4130-BF55-AE270180C327/44710ECC-10BB-48D1-93C7-AE270180C33E/podcast.rss

Note that I also tried to parse it with just ruby's rss module and that failed because of some invalid itunes tag, so there might be some additional surprises in there.

onli avatar Jul 03 '24 16:07 onli

thanks for the web feed link. i try to have a look later this summer. thks for your patience.

geraldb avatar Jul 03 '24 17:07 geraldb