Skip to content

Instantly share code, notes, and snippets.

@autch
Created November 2, 2011 12:39
Show Gist options
  • Save autch/1333518 to your computer and use it in GitHub Desktop.
Save autch/1333518 to your computer and use it in GitHub Desktop.
赤人てんてーを自動通報
#!/usr/bin/ruby1.9.1
# -*- encoding: utf-8-unix; -*-
require 'rubygems'
require 'grackle'
# add :auth parameter to retweet/post
client = Grackle::Client.new()
tw = client.statuses.user_timeline.json?(:screen_name => 'akahito65535')
tw.select{|i| /幼女/ =~ i.text }.each do |tw|
# skip if it'a old-school retweet or mention
next if /@/=~ tw.text or /RT/ =~ tw.text
# TSU-HO-SHIMASHITA!!
#client.statuses.update!(:status => "\#千葉県警 RT #{tw.text}")
puts tw.text
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment