Created
September 10, 2009 12:46
-
-
Save boffbowsh/184532 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
#! /usr/local/bin/ruby | |
require 'rubygems' | |
require 'nokogiri' | |
require 'open-uri' | |
doc = Nokogiri.XML(open('http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=boffbowsh&api_key=b25b959554ed76058ac220b7b2e0a026').read) | |
puts "Now Playing: #{doc.css('track[nowplaying=true] artist')[0].content} - #{doc.css('track[nowplaying=true] name')[0].content}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment