Skip to content

Instantly share code, notes, and snippets.

@ssig33
Created September 27, 2011 09:58
Show Gist options
  • Save ssig33/1244730 to your computer and use it in GitHub Desktop.
Save ssig33/1244730 to your computer and use it in GitHub Desktop.
require "mechanize"
alice = Mechanize.new
(0..20).each{|q|
t = q*50 + 1
page = alice.get "http://tophatenar.com/ranking/subscriber/#{t}?blog=hatena"
page.root.xpath("//td[@class='odd']/a").map{|x| x["href"].split("/").last}.uniq.each{|d|
begin
page = alice.get "http://delicious.com/register"
form = page.forms[1]
form.username = d
form.password = "kogaidan"
form.email = "#{d}@ssig33.com"
page = alice.submit form
rescue
end
puts d
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment