Python Forum
Python Instagram bot user-following problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python Instagram bot user-following problem
#1
Hi, I found a Github program on a forum and want to use it to follow people on Instagram. It may have a bug that it follows the same people repeatedly but I don't know Python so I don't know how to fix it. Some other people on the forum have the same problem. We'd appreciate it if someone helped. I can't post links yet so here is the file follow_protocol (maybe the bug can be fixed from there).

#!/usr/bin/env python
# -*- coding: utf-8 -*-
from user_info import get_user_info
from feed_scanner import feed_scanner
import random
import time

def follow_protocol(self):
    limit = random.randint(5,10)
    while self.follow_counter<limit:
        chooser = 0
        if len(self.user_info_list)>0:
            chooser = random.randint(0,len(self.user_info_list)-1)
            self.current_user=self.user_info_list[chooser][0]
            self.current_id=self.user_info_list[chooser][1]
            print('=============== \nCheck profile of '+self.current_user+'\n===============')
            get_user_info(self, self.current_user)
        else :
            print('xxxxxxx user info list is empty!!! xxxxxxxxx')
            feed_scanner(self)
        if self.is_selebgram!=True and self.is_fake_account!=True and self.is_active_user!=False :
            if self.is_following!=True :                
                print('Trying to follow : ' + self.current_user + ' with user ID :' + self.current_id)
                self.follow(self.current_id)
                print('delete ' + self.user_info_list[chooser][0]+' from user info list')
                del self.user_info_list[chooser]
        else :
            print('delete ' + self.user_info_list[chooser][0]+' from user info list')
            del self.user_info_list[chooser]
                
        time.sleep(random.randint(13,26))
Reply
#2
I am not sure what you are trying to do?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  how to make bot that sends instagram auto password reset code kraixx 2 1,270 Mar-04-2023, 09:59 PM
Last Post: jefsummers
  Upload image to Instagram using python/selenium using image URL failed, need help greenpine 5 5,337 Feb-22-2022, 09:42 PM
Last Post: snippsat
  instagram followers name without suggestion for you jacklee26 1 3,127 Oct-02-2021, 04:57 AM
Last Post: ndc85430
  Problem restricting user input in my rock paper scissors game ashergreen 6 4,492 Mar-25-2021, 03:54 AM
Last Post: deanhystad
  Problem with user defined main menu function stefzeer 3 2,341 Mar-27-2020, 06:12 AM
Last Post: buran
  Predicting Likes on Instagram Posts donnertrud 1 2,281 Dec-28-2019, 08:53 AM
Last Post: kamaleon
  new user coding problem mattkrebs 1 2,997 Mar-21-2017, 12:45 PM
Last Post: buran
  I have a problem with user enter, any help? Qubayel 2 3,501 Mar-20-2017, 11:24 AM
Last Post: Qubayel
  MySQLdb, problem with query with user-defined variables buran 6 6,316 Feb-03-2017, 06:16 PM
Last Post: buran
  Instagram pagination tags Kalet 1 4,944 Dec-14-2016, 09:56 PM
Last Post: nilamo

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020