i = 1
ii =35
while i < 37
usernames = (username + i.to_s)
twitter = Twitter::Base.new(Twitter::HTTPAuth.new(usernames, password))
picname = ("./iconname"+ii.to_s+".png")
pic = open(picname, "r")
begin
twitter.update_profile_image(pic)
puts (i.to_s + '個変更した')
rescue
sleep 1
puts 'retry'
retry
end
i = i + 1
ii = ii -1
end
#Remove Section i = 1 while i < 37 followlist = articon + i .to_s begin client.friendship_destroy followlist rescue puts 'unfollowでなんかのエラー' puts 'リトライ' sleep 5 retry end i = i + 1 end
#Follow Section i = 1 while i < 37 followlist = articon + i .to_s begin client.friendship_create followlist rescue puts 'followでなんかのエラー' puts 'リトライ' sleep 5 retry end i = i + 1 end
#Remove Section i = 1 while i < 37 followlist = articon + i .to_s begin twitter.friendship_destroy followlist rescue puts 'unfollowでなんかのエラー' puts 'リトライ' sleep 5 retry end i = i + 1 end
#Follow Section i = 1 while i < 37 followlist = articon + i .to_s begin twitter.friendship_create followlist rescue puts 'followでなんかのエラー' puts 'リトライ' sleep 5 retry end i = i + 1 sleep 1 end