load '~/.irbrc' # dotfiles.org/~brendano/.irbrc require 'hpricot' sites=[] for url in [ "http://www.alexa.com/site/ds/top_sites?ts_mode=lang〈=en"] h = Hpricot open(url).read sites += (h/'h3'/'a').map{|x| x['href']} end puts sites.join("\n")