Skip to content

Instantly share code, notes, and snippets.

@itochan
Created January 14, 2013 10:09
Show Gist options
  • Save itochan/4529060 to your computer and use it in GitHub Desktop.
Save itochan/4529060 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
# coding: utf-8
require "oauth"
require "json"
while true
begin
c = OAuth::Consumer.new("","", {:site => "http://twitter.com"})
t = OAuth::AccessToken.new(c, "", "")
JSON.parse(t.get("/statuses/user_timeline.json?count=200").body).each do |p|
puts "#{p["id"]}: #{p["text"]}"
p t.post("/statuses/destroy/#{p["id"]}.json") rescue nil
end
sleep 60
rescue
puts "fail!"
sleep 20
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment