Created
March 18, 2009 15:15
-
-
Save badboy/81179 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
%w(open-uri hpricot).each { |lib| require lib } | |
BASEURL = "http://www.rubyusers.com" | |
puts Hpricot(open("#{BASEURL}/users/list")).search("//li[@class^='size_']/a").map { |a| | |
[a.inner_text, Hpricot(open("#{BASEURL}#{a[:href]}")).search("//p/li").size] | |
}.sort_by{|e|e[1]}.reverse.map{|e|e*': '} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment