def main(): try: args = aux_funcs.get_args() api = InstagramAPI(args.user, args.password) api.login() user_id = aux_funcs.get_id(str(args.target)) try: print "Getting user feed. This may take a long time" photos_ids = api.getTotalUserFeed(user_id) print "Done! \n\nLiking all photos" for p in photos_ids: api.like(p.get("id")) time.sleep(delay_seconds) print "Done!" except: print "Unable to get user feed. Maybe account is private?" except: printUsage()
import aux_funcs, sys, json, time, random from LevPasha.InstagramAPI import InstagramAPI followers = [] followings = [] args = aux_funcs.get_args() api = InstagramAPI(args.user, args.password) ### Delay in seconds ### unfollow_delay = 5 follow_delay = 1 def printUsage(): print( "Usage: \n+ python main.py -u USERNAME -p PASSWORD -o info: Show report" ) print( "+ python main.py -u USERNAME -p PASSWORD -o follow-tag -t TAG: Follow users using the tags you introduce" ) print( "+ python main.py -u USERNAME -p PASSWORD -o follow-location -t LOCATION_ID: Follow users from a location" ) print( "+ python main.py -u USERNAME -p PASSWORD -o super-followback: Follow back all the users who you dont follow back" ) print( "+ python main.py -u USERNAME -p PASSWORD -o super-unfollow: Unfollow all the users who dont follow you back" ) print( "+ python main.py -u USERNAME -p PASSWORD -o unfollow-all: Unfollow all the users"
time.sleep(0.9) print(u' %s\u25a3 %sAuthor %s: %sNjank Soekamti ' % (R1, W0, C0, W0)) print(u' %s\u25a3 %sContributor %s: %skiller.Bytes[%s0%s] ' % (R1, W0, C0, W0, R0, W0)) time.sleep(0.5) exit(' ') try: logo() print('%s Please login using your Instagram account first' % C0) time.sleep(0.8) uname = input(u'%s \u2022 %susername : '******'%s \u2022 %spassword : '******'\n %sStart unfollow not follow back. Please wait ...' % C0) count = 0 for i in followings: if i not in followers: count += 1 time.sleep( float(random.uniform(min_delay * 10, max_delay * 10) / 10)) user_id = aux_funcs.get_id(i) print(' %s%s%s) %sUnfollowing %s> %s%s' % (W0, str(count), R0, W0, R0, W0, i))
from LevPasha.InstagramAPI import InstagramAPI USERNAME = "" PASSWORD = "" followers = [] followings = [] api = InstagramAPI(USERNAME, PASSWORD) def read_from_file(file): arr = [] with open(file, "r") as f: arr = f.read().splitlines() return arr def main(): api.login() followers_temp = read_from_file("followers.txt") open("followers.txt", 'w').close() followings_temp = read_from_file("followings.txt") open("followings.txt", 'w').close() f_followers = open("followers.txt", 'w') for i in api.getTotalSelfFollowers(): followers.append(i.get("username")) f_followers.write(str(i.get("username")) + '\n') f_followers.close() f_followings = open("followings.txt", 'w')