view c109047bot.rb @ 11:4dcbbfa7f191

Detect xsotter_class via .
author yuuji@gentei.org
date Sat, 11 Feb 2012 12:48:07 +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