kurtmckee/feedparser

Get raw RSS feed

grubeli opened this issue · 2 comments

I used feedparser to modify values in entries, is there a way to get raw RSS/xml string from feedparser parsed object?

Not by using feedparser alone, it only does deserialization.

You can use something like feedgen, though; here's an example of feedgen in use; instead of page, you would get data from d.feed, and instead of children, you would use the entries from d.entries (where d is the return value of feedparser.paser()).

(Unless @kurtmckee plans to support round-tripping feeds in the future, I think this can be closed.)

@grubeli You can use the requests package or similar to make the HTTP request. This will give you access to the raw XML, and it can be passed into feedparser as well for parsing.

@lemon24 Thanks for contributing to this! You're right, I have no plans to do XMl->object->XML round-tripping.