b31ngd3v / MyIGBot

MyIGBot is a Private API for Instagram to like, follow, comment, view & intaract with stories, upload post & stories, get all information about a user/posts and get posts based on locations/hashtags. It also supports proxy.
https://pypi.org/project/myigbot/
MIT License
174 stars 35 forks source link

add return spam #6

Closed online002 closed 3 years ago

online002 commented 3 years ago

please add error handling when returning json smap {"message": "", "spam": true, "status": "fail"}

eg try follow_count = json.loads (response) ['graphql'] ['user'] ['edge_follow'] ['count'] except

follow_count = json.loads (response) ['spam']

b31ngd3v commented 3 years ago

Sorry I didn't get you, can you explain a bit more, What's the issue ?

online002 commented 3 years ago

due to frequent requests, instagram responds in json that this is spam, you can do so that the code does not break off and return spam with a message

b31ngd3v commented 3 years ago

Thank you for your suggestion, surely I'll add this error handling to the next version. Thanks again.

online002 commented 3 years ago

if it doesn't make it difficult, you can write recommendations for timers to avoid spam ban

b31ngd3v commented 3 years ago

Need a bit help from you, can you tell me when you get this type of response and what (type of task) you're performing then ?

online002 commented 3 years ago
from myigbot import MyIGBot
import random

bot = MyIGBot('login', 'pass')

akk = 'livesound_official'
followers_count = bot.user_followers_count(akk)

def private():
    lst_follow = bot.user_followers(akk, limit=followers_count)
    for i in lst_follow:
        time.sleep(random.randint(10, 11))
        private = bot.private_user(i) 
        if private == True:
            print(i, private)
b31ngd3v commented 3 years ago

MAN! I didn't know my api is that powerful. It successfully grabbed 66,000 usernames 😳.

PicsArt_11-28-08 00 19