Re: ActivePython and Amara
- From: "James" <fphsml@xxxxxxxxx>
- Date: 14 Dec 2005 03:02:34 -0800
OK! The story so far ...
You wanted to parse an RSS feed and wanted a simple library. You tried
Amara. The binary installer had a problem. Not sure what was the issue
with installing the source via distutils.
Since you have way too many options to do this, it is probably better
to switch to another module for now.
ElementTree is another good module
http://effbot.org/downloads/elementtree-1.2.6-20050316.win32.exe
Following is a snippet of code that probably does what you want.
You should be able to extend it from there.
You might want to read this before you finish your aggregator.
http://diveintopython.org/http_web_services/review.html
Basically some netiquette when you repeatedly poll someone's server.
---------------------------------------------------------------------------------------
from elementtree import ElementTree as ET
from urllib import urlopen
rss = ET.parse(urlopen('http://www.digg.com/rss/index.xml'))
title = rss.find('//channel/title').text
articles = [item.find('title').text for item in
rss.findall('//channel/item')]
.
- Follow-Ups:
- Re: ActivePython and Amara
- From: Jay
- Re: ActivePython and Amara
- References:
- ActivePython and Amara
- From: Jay
- Re: ActivePython and Amara
- From: alex23
- Re: ActivePython and Amara
- From: Jay
- Re: ActivePython and Amara
- From: James
- Re: ActivePython and Amara
- From: Jay
- ActivePython and Amara
- Prev by Date: Re: ActivePython and Amara
- Next by Date: Re: How do (not) I distribute my Python progz?
- Previous by thread: Re: ActivePython and Amara
- Next by thread: Re: ActivePython and Amara
- Index(es):