ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.65k stars 1.48k forks source link

Follow Users Followers - Long Load Times #174

Closed ghost closed 6 years ago

ghost commented 7 years ago

Quick question, when I pull users followers, sometimes I pull from users with many thousands of followers. so the load time is crazy long, and it wouldn't matter because I'm trying to cap the amount of follows I perform to 500 a day. Is there a way to set the script to only scrape the first 800 or so users.

New to python and really enjoy the opportunity to learn more about the program :)

def follow_followers(self, user_id, nfollows=None):
    self.logger.info("Follow followers of: %s" % user_id)
    if not user_id:
        self.logger.info("User not found.")
        return
    follower_ids = self.get_user_followers(user_id)
    if not follower_ids:
        self.logger.info("%s not found / closed / has no followers." % user_id)
    else:
        self.follow_users(follower_ids[:nfollows])
tayfunyasar commented 7 years ago

Try to save each 800 followers into different csv files using examples/multi_script_CLI.py (command12)

Is there any better solutions?

ohld commented 7 years ago

The better solution will be released in a new Instabot version, which is already under development.

octave commented 7 years ago

Looking forward to it!

ghost commented 7 years ago

@ohld sounds awesome, when do you think the new version will drop :)

ohld commented 7 years ago

the new version is developing here https://github.com/instagrambot/instapro but this version is mostly for developers

BobZombiE69 commented 7 years ago

an example:

in ultimate_schedule\ultimate.py

def job4(): bot.follow_followers(get_random(random_user_file),200) #only scan and follow 200 users

in multi_script_cli.py

elif ans == "2":
    print("""
    1.insert username
    2.use username database
    """)
    if "1" in sys.stdin.readline():
        user_id = input("who?\n").strip()
    else:
        user_id = random.choice(bot.read_list_from_file(users_file))
    bot.follow_followers(user_id,100)  #add nfollows ,100 only scan and follow 100 users
    menu_follow()
ohld commented 6 years ago

Reopen if you still have not found the solution (don't forget to update the bot).