Skip to content

Instantly share code, notes, and snippets.

@danielnegri
Forked from tommorris/gist:290274
Created December 27, 2012 15:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save danielnegri/4389145 to your computer and use it in GitHub Desktop.
Save danielnegri/4389145 to your computer and use it in GitHub Desktop.
import dispatch._
import Http._
import scala.xml._
var http = new Http()
var tweets = XML.loadString(http("http://twitter.com/statuses/user_timeline.xml?screen_name=tommorris" as_str))
(tweets \\ "status" \ "text").toList.foreach(x => println(x.text))
require "open-uri"
require "nokogiri"
tweets = Nokogiri::XML(open("http://twitter.com/statuses/user_timeline.xml?screen_name=tommorris").readlines.join)
tweets.search("//status/text").each {|i| puts i.text }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment