Skip to content

Instantly share code, notes, and snippets.

@conmame
Created April 30, 2012 02:29
Show Gist options
  • Save conmame/2555000 to your computer and use it in GitHub Desktop.
Save conmame/2555000 to your computer and use it in GitHub Desktop.
coderwall team ranking
# -*- encode:utf-8 -*-
require 'mechanize'
agent = Mechanize.new { |a|
a.user_agent_alias = 'Mac Safari'
a.max_history = 0
}
agent.get('http://coderwall.com/teams/4f61c42bdb6418000a000001') do |page|
puts (page/'//*[@class="your-rank"]/span').inner_html.gsub(/rd|th/, '')
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment