Advertisement
Guest User

Untitled

a guest
May 7th, 2017
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.66 KB | None | 0 0
  1. #!/usr/bin/perl
  2. # updated for 3.02000
  3. use Net::Twitter;
  4.  
  5. my ($username,$password) = @ARGV;
  6.  
  7. my $twit = Net::Twitter->new(username=>$username, password=>$password,
  8.     traits   => [qw/API::REST/],
  9. );
  10. my $results = undef;
  11. do {
  12.     $results = $twit->user_timeline({count=>200});
  13.     if ($results && @{$results}) {
  14.         foreach my $tweet ( @{ $results } ) {
  15.             warn "Destroy ".$tweet->{id};
  16.             $twit->destroy_status($tweet);
  17.             sleep 1;
  18.         }
  19.     } else {
  20.         $results = undef;
  21.     }
  22.     # not really sure how to end this
  23.     # what might happen is once you hit the end
  24.     # you might just hit twitter hard. so once everything is deleted
  25.     # it stays that way
  26. } while ($results);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement