Skip to content

Instantly share code, notes, and snippets.

@shingara
Created October 8, 2008 12:13
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save shingara/15503 to your computer and use it in GitHub Desktop.
Save shingara/15503 to your computer and use it in GitHub Desktop.
require 'mechanize'
user = 'xxxx'
pass = 'xxxx'
a = WWW::Mechanize.new
page_post = a.post("http://#{user}.labrute.fr/login", 'pass' => pass)
3.times do
login = ''
a.get("http://#{user}.labrute.fr/arene") do |page|
login = page.search("//div[@class='name']")[0].inner_text
puts login
end
a.get("http://#{user}.labrute.fr/vs/#{login}")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment