Skip to content

Instantly share code, notes, and snippets.

@lstoll
Created May 1, 2010 11:29
Show Gist options
  • Save lstoll/386253 to your computer and use it in GitHub Desktop.
Save lstoll/386253 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'open-uri'
require 'mechanize'
require 'pp'
site_dashboard_url = 'http://www.tumblr.com/tumblelog/lstoll'
email = '[email protected]'
password = 'xxxxxx'
agent = WWW::Mechanize.new
agent.follow_meta_refresh = true
login = agent.get('http://www.tumblr.com/login')
page = login.form_with(:action => '/login') do |f|
f.email = email
f.password = password
end.click_button
page = agent.get(site_dashboard_url)
while form = page.form_with(:action => '/delete')
puts "about to submit..."
page = form.submit
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment