Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from InstagramAPI import InstagramAPI
- import random
- import time
- ## you will need this api for python3 https://github.com/LevPasha/Instagram-API-python
- global req_ids
- req_ids = []
- print("I apologize but this version does not accept 2FA HOWEVER")
- print("I advice you turning it back on after running program")
- print("if the source code is not provided wherever you got this program it may be a trap - ~Jun")
- user = input("What is your username: ")
- passs = input("What is your pass: ")
- API = InstagramAPI(user,passs)
- API.login()
- def getreq():
- API.getPendingFollowRequests()
- API.LastJson
- req_users = []
- #print(unformatedreq)
- next_max_id = True
- while next_max_id:
- # first iteration hack
- if next_max_id is True:
- next_max_id = ''
- _ = API.getPendingFollowRequests()
- req_users.extend(API.LastJson.get('users', []))
- next_max_id = API.LastJson.get('next_max_id', '')
- unique_req = {
- f['pk']: f
- for f in req_users
- }
- for s in unique_req:
- req_ids.append(s)
- pass
- getreq()
- API.follow("9006188352") #Comment this out if you dont wanna follow me :p (put a # in front)
- i = len(req_ids)
- print("You have a total of: " + str(i) + " requests")
- a = input("How many requests would you like to accept: ")
- accept_requests = int(a)
- def acceptreq(numaccept):
- print("Begun accepting "+ str(numaccept) +" requests")
- print("If you would like to stop at anytime please press CTRL-C")
- print("If you would like to donate or support me feel free to donate")
- print("Cash app - $pandev (Silly someone tried charging $40 for this)")
- print("Alternatively you could also give me a shoutout on insta @dailyhappydogs")
- r = 0
- for x in req_ids:
- if r < numaccept:
- randnum = random.randint(10,300) #wait between x seconds and x seconds
- API.approve(x)
- r += 1
- print("Just completed "+ str(r) + " requests")
- print("going to sleep for: "+ str(randnum) + " seconds")
- time.sleep(randnum)
- print("Done sleeping moving on to next")
- else:
- break #program will end once you reach the number of requests you want to accept
- acceptreq(accept_requests)
- print("successfully accepted "+a+" requests ")
- print("Have a great day hope this little thing worked well")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement