-
-
Save danielnegri/4389145 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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