Created
April 17, 2010 21:49
-
-
Save wheresalice/369822 to your computer and use it in GitHub Desktop.
Mass delete Tumblr posts
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
# http://lds.li/post/232870067/bulk-deleting-tumblr-posts | |
require 'rubygems' | |
require 'open-uri' | |
require 'mechanize' | |
require 'pp' | |
site_dashboard_url = 'http://www.tumblr.com/tumblelog/lstoll' | |
email = 'lstoll@lstoll.net' | |
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