[Update on 2009-03-19]
This simple example shows you how simple it is to search for tweets using Twitter’s Search API
Key techniques demonstrated in this sample code
Code is available here: http://cid-19ec39cb500669d8.skydrive.live.com/browse.aspx/Public/IronPython/Samples
# # Date: 2009-03-19 # Author: Saveen Reddy # Author email: saveenr@microsoft.com # import clr import System clr.AddReferenceByPartialName('System.Xml') import System.Xml import pprint def main () : term='ironpython' rpp = 100 page = 1 query = r"http://search.twitter.com/search.atom?q=%s&rpp=%s&page=%s" % (term,rpp,page) content = System.Net.WebClient().DownloadString(query) dom= System.Xml.XmlDocument() nsmgr = System.Xml.XmlNamespaceManager( dom.NameTable) nsmgr.AddNamespace( "atom", "http://www.w3.org/2005/Atom") ; dom.LoadXml( content ) root = dom.DocumentElement entry_nodes = [ n for n in root.SelectNodes( "atom:entry" ,nsmgr) ] def get_prop( n , q) : return n.SelectSingleNode(q,nsmgr).InnerText text = [ ( get_prop(n,"atom:updated"), get_prop(n,"atom:author/atom:name") , get_prop(n,"atom:title") ) for n in entry_nodes] pprint.pprint(text) if ( __name__ == '__main__' ) : main()