view c109047bot.rb @ 12:42e9379d8c1d default tip

gem ver up to 1.8.20 twitter ver up 2.1.1
author KAMURA Sota <c109047@e.koeki-u.ac.jp>
date Thu, 22 Mar 2012 14:06:08 +0900
parents b79b888eceac
children
line wrap: on
line source

#! /usr/bin/env ruby
# -*- coding: euc-jp -*-

require'/home/irhome/c109/c109047/xsotter/xsotter_class'
def follow ()
  followers = Twitter.follower_ids("c109047").ids
  following = Twitter.friend_ids("c109047").ids
  newbie = followers - following
  newbie.each do |i|
     Twitter.friendship_create(i)
  end
end

begin 
  xsotter = Xsotter.new("/xsotter/c109047_token")
  
  #ptl = xsotter.public_tl
  while true
    if /^0/=~Time.now.min.to_s
      follow
      xsotter.comand(["-T","#{Time.now.hour}»þ¤À¤è"])
   
    end
    sleep 59
  end
rescue
  retry
end

yatex.org