Re: importing entries

Wari Wahab <[email protected]>
Newsgroups gmane.comp.web.pyblosxom.devel
Message-ID <[email protected]>
> I tested this on both Ted's and my sites' main RSS files, and it
> worked like a charm. It seems, in looking over some RSS from others,
> that some feeds use the 'content:encoded' tag, while others use
> 'description'. I test for a content tag (which is a little wonky in
> cElementTree, so there's room for improvement in that test), and if
> it's there, use that. If not, I use the description.

These parsing issues are usually taken care of by the feedparser by 
Mark Pilgrim. It even does so without using an unforgiving XML parser.

> Also, how do you want to do file naming? I sanitize the title and use
> the first 200 characters of it, but that's suboptimal.

There's also date/time that wasn't imported, easily solvable though. 
What about comment feeds support? These are things that first time 
users will ask for.

But I have to say Bill that it's a great try at coming up with what 
Will wanted. Nice job :)

I'd say use the feedparser library @ 
http://diveintomark.org/projects/feed_parser/feedparser.py and you have 
years of bug fixes to support all other RSS anomalies and you got the 
bonus of supporting atom, and is unicode too.

Just did a quick lookup and looks like there's a nice feedparser 
website. http://feedparser.org/

Using feedparser, your code would be simpler, and you just have to deal 
with domains that you have not faced yet in the world of RSS. Really 
Simple Syndication isn't.



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.