feedparser icon indicating copy to clipboard operation
feedparser copied to clipboard

Access to arbitrary elements.

Open frederikcreemers opened this issue 10 years ago • 3 comments

I'm specifically looking to access the itunes:owner element of a podcast feed, but I think that access to arbitrary non-standard elements would be useful.

frederikcreemers avatar May 28 '15 17:05 frederikcreemers

@kurtmckee is it possible to do this?

For example, I'm writing a podcast app. I would prefer to have itunes:author take precedence over any of the other feed.author elements. I'd like to be able to access all the original raw elements with something like: feed['itunes:author'] or similar.

I see under the namespaces documentation, you should be able to access it with something like: feed.itunes_author, however, it looks like because you have mapped some of the extension properties to core properties, not all of them work?

I would think it would be better to duplicate this item and have it available via the mapped core element, and the original extension element.

mmcdole avatar Sep 12 '15 17:09 mmcdole

@bigblind, @mmcdole, thanks for the feedback! You're both right, this is something that needs to be addressed. People need access to custom elements and attributes, some need the information to map to core elements (like dcterms:issued to published), others require it to be separate...so I'm thinking about how to handle these requirements. I'll update this ticket when code lands in the develop branch, and I'm open to suggestions that don't involve turning feedparser into a generic XML DOM parser. =)

kurtmckee avatar Feb 29 '16 00:02 kurtmckee

any news?

gaodeng avatar Jan 02 '20 14:01 gaodeng