Last active
December 17, 2015 05:29
-
-
Save tsux89/5558564 to your computer and use it in GitHub Desktop.
Perl,cmd上で簡単にブロック・ブロック解除できるようなスクリプトがほしかった。
後に、リストにあるscreennameをすべてブロック・ブロック解除する機能も追加した。
リストを作成するためにフォロワーの一覧を.txtでエクスポートする手助けをするスクリプト。⇒https://gist.github.com/tsux89/5568935
This file contains hidden or 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
| # usr/bin/perl | |
| use stricts; | |
| use warnings; | |
| use Net::Twitter; | |
| my $consumer_key ='IQKbtAYlXLripLGPWd0HUA'; | |
| my $consumer_secret = 'GgDYlkSvaPxGxC4X8liwpUoqKwwr3lCADbz8A7ADU'; | |
| print 'Enter your screenname : '; | |
| my $user = <STDIN>; | |
| chomp($user); | |
| print 'Enter your password : '; | |
| my $user = <STDIN>; | |
| chomp($password); | |
| my $nn = Net::Twitter->new( | |
| CONSUMER_KEY => $consumer_key, | |
| CONSUMER_SECRET => $consumer_secret, | |
| ); | |
| my ( $access_token , $access_token_secret ) = $nn->xauth( $screenname , $password ); | |
| my $nt = Net::Twitter->new( | |
| CONSUMER_KEY => $consumer_key, | |
| CONSUMER_SECRET => $consumer_secret, | |
| ACCESS_TOKEN => $access_token, | |
| ACCESS_TOKEN_SECRET => $access_token_secret, | |
| ); | |
| open(DATA, "< bomb.txt"); | |
| my @contents = <DATA>; | |
| while(@contents){ | |
| my $who = $_; | |
| chomp($who); | |
| $nt->blocking_id($who); | |
| $nt->destroy_friend($who); | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment