用Python解析RSS

用Python解析RSS,python,rss,feedparser,Python,Rss,Feedparser,我正在尝试使用python解析rss提要 rss源的格式为: <rss xmlns:media="http://search.yahoo.com/mrss/" version="2.0"> <channel> <title>Yahoo! News - Latest News & Headlines</title> <link>http://news.y

我正在尝试使用python解析rss提要

rss源的格式为:

 <rss xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
      <channel>
                <title>Yahoo! News - Latest News & Headlines</title>
                <link>http://news.yahoo.com/</link>
                <description>...</description>
                <language>en-US</language>
                <copyright>Copyright (c) 2013 Yahoo! Inc. All rights reserved</copyright>
                <pubDate>Thu, 30 May 2013 21:14:41 -0400</pubDate>
                <ttl>5</ttl>
                <image>...</image>
                <item>...</item>
                <item>...</item>
                <item>...</item>
      </channel>
 </rss>

雅虎!新闻-最新新闻和标题
http://news.yahoo.com/
...
恩美
版权所有(c)2013雅虎!版权所有
2013年5月30日星期四21:14:41-0400
5.
...
...
...
...
我需要提取
的一些详细信息

使用
printfeed['channel']['title']
etc,我可以获得那些只出现一次的块的详细信息。如何提取项目的详细信息<代码>提要['channel']条目[0]或
提要['channel']['items[0]]]
等似乎不起作用

feed.entries[doc_iter]['title'] 
似乎有效。
doc\u iter
提到了第I项。

我假设您正在为此使用某种XML或RSS解析库?我正在使用feedparser库这是您需要的吗?这些项目在d.entries中可用,d.entries是一个列表