Skip to content

Instantly share code, notes, and snippets.

@yuroyoro
Created October 30, 2009 06:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuroyoro/222181 to your computer and use it in GitHub Desktop.
Save yuroyoro/222181 to your computer and use it in GitHub Desktop.
object ScreennameToId {
import scala.xml._
import scala.io.Source
def main(args:Array[String]) = {
val source = Source.fromURL("http://twitter.com/users/show.xml?screen_name=%s".format(args.first))
val xml = XML.loadString( source.getLines.mkString )
println( xml \\ "id" text)
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment