Mercurial > hgrepos > hgweb.cgi > xsotter
diff c109047bot.rb @ 0:b79b888eceac
init
author | KAMURA Sota <c109047@e.koeki-u.ac.jp> |
---|---|
date | Mon, 06 Feb 2012 17:25:58 +0900 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/c109047bot.rb Mon Feb 06 17:25:58 2012 +0900 @@ -0,0 +1,28 @@ +#! /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