Created
August 2, 2013 13:02
-
-
Save pnlybubbles/6139688 to your computer and use it in GitHub Desktop.
タイムラインでバルスとつぶやいた人を即刻リムります。:35のコメントを外すとブロックもできます。:36のコメントを外すとスパム報告もできます。
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
# encoding: utf-8 | |
require "twitter" | |
require "tweetstream" | |
CONSUMER_KEY = "" | |
CONSUMER_SECRET = "" | |
ACCESS_TOKEN = "" | |
ACCESS_TOKEN_SECRET = "" | |
Twitter.configure { |config| | |
config.consumer_key = CONSUMER_KEY | |
config.consumer_secret = CONSUMER_SECRET | |
} | |
client = Twitter::Client.new( | |
:oauth_token => ACCESS_TOKEN, | |
:oauth_token_secret => ACCESS_TOKEN_SECRET | |
) | |
TweetStream.configure { |config| | |
config.consumer_key = CONSUMER_KEY | |
config.consumer_secret = CONSUMER_SECRET | |
config.oauth_token = ACCESS_TOKEN | |
config.oauth_token_secret = ACCESS_TOKEN_SECRET | |
config.auth_method = :oauth | |
} | |
stream_client = TweetStream::Client.new | |
stream_client.userstream { |status| | |
if status.retweeted_status == nil && status.text =~ /バルス/ | |
puts "#{status.created_at} #{status.user.screen_name}: #{status.text}" | |
client.unfollow(status.user.id) | |
# client.block(status.user.id) | |
# client.report_spam(status.user.id) | |
end | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment