Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from instabot import Bot
- import time
- import datetime
- from random import randint
- bot = Bot(filter_private_users=False,
- min_likes_to_like=3,
- max_likes_to_like=120,
- max_followers_to_follow=1000,
- max_following_to_follow=1200,
- max_following_to_followers_ratio=8,
- max_followers_to_following_ratio=3)
- bot.login(username="user", password="******")
- #users_stream = ["iampapihans", "virgogotsauce", "dim4ous", "borobachkadosta", "ndoe_drs", "stefosnikatotnos"]
- comments = ["Страхотно 👌🎍😍", "Супер 😋", "Eхaa ❤", "Яко 😋", "❤❤❤", "Харесвам 👍", "👍", "😋😋", "❤", "👌", "👌👌", "Eha 👌👌👌", "Goood 👍", "Top 🔝", "🔝🔝🔝", "🔝🔝", "🔝👌"]
- #user_to_sniff = "virgogotsauce"
- #users_to_get = 1000
- users_to_skip = 0
- total_followed_users = 0
- total_followed_users_per_hour = 0
- total_users_to_follow = 200
- total_users_to_follow_per_hour = 25
- unfollowed_user_pointer = -1
- rounds_count = 0
- now = datetime.datetime.now()
- currOur = now.hour
- total_liked = 0
- #followers = bot.get_user_followers(user_to_sniff, users_to_get + users_to_skip)
- followers = open("list.txt", "r").read().split(',')
- for follower in followers:
- now = datetime.datetime.now()
- if(currOur != now.hour):
- total_followed_users_per_hour = 0
- currOur = now.hour
- if(rounds_count >= users_to_skip):
- print("User index: " + str(rounds_count))
- user_media = bot.get_user_medias(follower)
- if(len(user_media) > 1):
- media_index_to_like = randint(0, 1)
- media_like_result = bot.like(user_media[media_index_to_like])
- if(media_like_result):
- # if(randint(0, 4) > 3):
- # comment_result = bot.comment(user_media[media_index_to_like], comments[randint(0, len(comments) - 1)])
- # if(comment_result):
- # print("Commented!")
- total_liked += 1
- time.sleep(randint(5, 12))
- if(total_followed_users < total_users_to_follow and total_followed_users_per_hour < total_users_to_follow_per_hour):
- follow_user_result = bot.follow(follower)
- if(follow_user_result):
- total_followed_users += 1
- total_followed_users_per_hour += 1
- time.sleep(randint(90, 160))
- follow_user_result = False
- has_longer_pause = False
- time_to_pause = randint(5, 30)
- if(time_to_pause > 39):
- has_longer_pause = True
- time_to_pause = randint(120, 180)
- time.sleep(time_to_pause)
- print("MEDIUM PAUSE: " + str(time_to_pause / 60.0) + " mins")
- else:
- time.sleep(time_to_pause)
- time.sleep(randint(3, 15))
- if(randint(1, 200) > 198 and has_longer_pause == False):
- pause_length = randint(180, 600)
- print("BIG PAUSE: " + str(pause_length / 60.0) + " mins")
- time.sleep(pause_length)
- if(total_followed_users % 3 == 0 and unfollowed_user_pointer < total_followed_users ):
- unfollowed_user_pointer = total_followed_users
- bot.unfollow_non_followers(1)
- time.sleep(randint(15, 60))
- print ("Loop")
- rounds_count += 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement