Created
September 5, 2011 16:09
-
-
Save esehara/1195356 to your computer and use it in GitHub Desktop.
ザ・インタビューズの未読1バグを引き起こした原因のソース
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rubygems" | |
require "mechanize" | |
max_id = 50000 | |
min_id = 1 | |
account = "robot666" | |
password = "xxxx" | |
user_id = 1909 | |
browser = Mechanize.new | |
print "Login... \n" | |
browser.post("http://theinterviews.jp/login",{["account",account],["password",password]}) | |
print "Success!! \n" | |
while true | |
print "Add List Start.\n" | |
for i in min_id..max_id | |
begin | |
print "Now Target_User_Id is " + i.to_s + "\n" | |
browser.post("http://theinterviews.jp/follow",{"user_id" => user_id.to_s,"target_user_id" => i.to_s,"mode" => "follow","page" => "http://www.google.com/"}) rescue Exception | |
end | |
end | |
min_id = max_id | |
max_id = max_id + 50 | |
sleep(600) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment