Anyone know of a good feed parser for python 3.1? I was using feedparser for 2.5 but it doesn't seem to be ported to 3.1 yet, and it's apparently more complicated than just running 2to3.py on it. Any help?
4 Answers
You may take a look at the Atom Models blog post by Ian Bicking. He proposes not to use any special "feed parsing" library because Atom and RSS are just XML so your model is really an XML tree, not some fancy class. You could try his code under Python 3.

- 16,489
- 7
- 44
- 62
-
4These days, anytime someone says "just XML", I usually suspect they're making a joke. This approach would work just fine if you're pulling in feeds produced by a single party in a very consistent way. But if there's really any human element at all, it's not going to work. Feeds are notoriously bad when it comes to not following standards, or for that matter, even being valid XML. Sometimes someone hands you the URI of an HTML page instead of a feed. Handling all that crap gracefully is something you want a library like `feedparser` to take care of. – Bob Aman Oct 14 '09 at 18:27
-
Yes, I'm aware of `feedparser`'s features. It was just another opinion on the subject. – Andrey Vlasovskikh Oct 14 '09 at 21:48
feedparser
is now available for Python 2.4 up to 3.3- https://code.google.com/p/feedparser/

- 3,871
- 5
- 33
- 45
I've been working on porting feedparser to Python 3, and I've published a feedparser/Python 3 development branch at GitHub with the results of that work so far.
There is also an open bug report about porting feedparser to Python 3, but since I'm a new user at StackOverflow, I'm currently limited to just a single link. You'll find the link to the bug report at the top of the GitHub page (it links to code.google.com).

- 1,410
- 13
- 17
Start porting feedparser
to Python 3.1.

- 32,839
- 9
- 71
- 95
-
hehe, I tried. Failed miserably. I'm more of a python "hack" than a programmer. – matthew Nov 02 '09 at 13:43