HaveF / feedparser

Automatically exported from code.google.com/p/feedparser
Other
0 stars 0 forks source link

support `itunes:image` elements with a `url` attribute #347

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The following feed

http://feeds.feedburner.com/TEDTalks_audio

uses both <itunes:image href=""> and <itunes:image src="">

Feedparser only finds the href version.

Simple patch attached.

Original issue reported on code.google.com by sly...@gmail.com on 21 Apr 2012 at 3:02

Attachments:

GoogleCodeExporter commented 9 years ago
Correction,
In the given feed <itunes:image url=""> is not parsed.

Original comment by sly...@gmail.com on 21 Apr 2012 at 3:04

GoogleCodeExporter commented 9 years ago
Corrected patch attached.
I am not sure if it's wise to do this, but href/url/src are easy to mix up
and never used together, so I don't see any dark side to it.

Original comment by sly...@gmail.com on 21 Apr 2012 at 3:18

Attachments:

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r700.

Original comment by kurtmckee on 25 Apr 2012 at 6:52

GoogleCodeExporter commented 9 years ago
Thanks for reporting this and providing a patch!

I modified the patch slightly when I committed it. Because the iTunes spec 
seems pretty hard-nosed about what the iTunes software will and won't accept, I 
don't think that anyone will seriously expect iTunes to support an undocumented 
`url` attribute. Certainly the feed's authors are mistaken for using it!

However, it seems worthwhile for feedparser to attempt to support the authors' 
intention, even if iTunes itself doesn't. Therefore, I added support and test 
cases for the `url` attribute, but not the `src` attribute.

Original comment by kurtmckee on 25 Apr 2012 at 6:59