Universal Feed Parser - How do I keep attributes?

snewman18 at gmail.com snewman18 at gmail.com
Wed Jan 10 18:38:43 CET 2007

I'm trying to use FeedParser to parse out Yahoo's Weather Data. I need
to capture some attribute values, but it looks like FeedParser strips
them out. Is there any way to keep them?

XML Snippet:
<yweather:location city="Sunnyvale" region="CA" country="US" />

When I try to get the value, it's empty:

>>> d = feedparser.parse('http://weather.yahooapis.com/forecastrss?p=94089')
>>> d.feed.yweather_location

More information about the Python-list mailing list