为了参加19楼西湖音乐节写的自动发帖脚本
上一篇 /
下一篇 2009-10-18 00:37:43
/ 个人分类:ruby&watir
require 'watir' # the controller
require 'test/unit'
class TC_zork < Test::Unit::TestCase
def test_a
a=0
while a<100
ie = Watir::IE.attach(:title, '西湖音乐节【10月17日第3期有奖问答】_咖啡大教室_杭州19楼')
ie.text_field(:name , "message").set("答案是小S")
ie.link(:href , "javascript.:;").click
sleep 30 #该死的30S回帖时间限制。。
a=a+1
if ie.text.include? "对不起,你两次发表间隔少于 30 秒,请不要灌水!"
puts "出错"
ie.send_keys("{BROWSER_BACK}")
end
end
puts a
end
end
茶几的是我没抢到388楼。。。估计和我抢的那个人是人肉抢的。。。
http://www.19lou.com/forum-11-thread-23067972-14-1.html#pid296867860
有兴趣的可以去看看。。。
收藏
举报
TAG: