Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
tells you what a username is listening to right now on Probably not of use to you.
#!/usr/bin/env ruby -KU
require 'rubygems'
require 'open-uri'
require 'hpricot'
if ARGV[0]
user = ARGV[0]
url = "{user}"
doc = Hpricot(open(url))
track ="table#recentTracks tbody tr:first td.subjectCell").inner_text.gsub("full track", "").strip
puts "#{user} is listening to #{track}"
puts "Wotlisten tells you what a short username is listening to (or most recently listened to)"
puts "Usage: wotlisten.rb username"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.