Last active
April 18, 2018 11:10
-
-
Save arwankhoiruddin/cf4a5ef98fffc564bde2c605ce93e608 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script use InstagramAPI provided here: https://github.com/LevPasha/Instagram-API-python/tree/master/InstagramAPI | |
import sys | |
import os | |
sys.path.append(os.path.abspath("yourpath/Instagram-API-python/InstagramAPI")) | |
from InstagramAPI import InstagramAPI | |
import time | |
import random | |
user = 'yourname' | |
pwd = 'yourpass' | |
api = InstagramAPI(user, pwd) | |
api.login() | |
api.getSelfUsersFollowers() | |
users = api.LastJson['users'] | |
for user in users: | |
api.getUserFollowers(user['pk']) | |
userFollowers = api.LastJson['users'] | |
for fol in userFollowers: | |
print 'username: ' + fol['username'] | |
print 'full name: ' + fol['full_name'] | |
print '==============' | |
if not fol['is_private']: | |
api.follow(fol['pk']) | |
print 'this user is followed' | |
print '=====================' | |
time.sleep(random.randint(30, 480)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment