feedreader 0.3.1
feedreader is an universal feed parser designed to operate on top of the lxml interface.This is a VERY rough readme, and this project is very early in development. It however, is used to power Lifestrm.com.Our mission was simple: * Don\'t write an XML parser (we use lxml) * Keep it transparent, but allow easy access to underlying objects. * Support as many services as possible, and make accessing their media easy.Installation: * http://codespeak.net/lxml/ * http://labix.org/python-dateutilUsage:There are several methods which are usable to parse a feed:from feedreader.parser import from_urlparsed = from_url(\'http://www.domain.com/rss.xml\')from feedreader.parser import from_stringparsed = from_string(open(\'my.rss\', \'r\').read())from feedreader.parser import from_fileparsed = from_file(open(\'my.rss\', \'r\'))Once you have initialized the parser, you will be able to access supported elements via a natural property syntax:>>> parsed.titleMy feed title>>> parsed.linkhttp://www.domain.com/rss.xml>>> parsed.publisheddatetime.datetime(2009, 8, 13, 2, 53, 11, 867908)For the entries in a feed, you may use the entries accessor:>>> parsed.entries[< Entry ... >, < Entry ... >, < Entry ... >]And each entry also supports similar common attributes:>>> parsed.entries[0].titleMy Article Name>>> parsed.entries[0].linkhttp://www.domain.com/my-article-nameKeeping with our goals of allowing access to underlying XML, feedreader is a simple proxy. What this means is that while we provide accessors for many common attributes across feeds, you can still get at any XML element fairly easily:>>> parsed.myUnsupportedXMLTag(Fill me in with whatever lxml would return)Here are some key features of \"feedreader\":
Ссылка: http://pypi.pyt..s/source/f/feedreader/feedreader-0.3.1.tar.gz#md5=13b3771db962c3d854ea1807a6d42694
Ссылка: http://pypi.pyt..s/source/f/feedreader/feedreader-0.3.1.tar.gz#md5=13b3771db962c3d854ea1807a6d42694
Видео: