예제 #1
0
account = instagram.get_account(username)
sleep(1)
following = instagram.get_following(account.identifier, 10, 10, delayed=True)
for following_user in following['accounts']:
    print(following_user)

#get folleers
print("followers")

sleep(2) # Delay to mimic user

username = '******'
followers = []
account = instagram.get_account(username)
sleep(1)
followers = instagram.get_followers(account.identifier, 10, 10, delayed=True)

for follower in followers['accounts']:
    print(follower)


#get account by username
print("account from username")
account = instagram.get_account('kevin')

# Available fields
print('Account info:')
print('Id', account.identifier)
print('Username', account.username)
print('Full name', account.full_name)
print('Biography', account.biography)
예제 #2
0
#TODO does not work currently instagram changed api
from time import sleep
from context import Instagram  # pylint: disable=no-name-in-module

instagram = Instagram()
instagram.with_credentials('username', 'password', 'path/to/cache/folder')
instagram.login()

sleep(2)  # Delay to mimic user

username = '******'
followers = []
account = instagram.get_account(username)
sleep(1)
followers = instagram.get_followers(
    account.identifier, 1000, 100, True
)  # Get 1000 followers of 'kevin', 100 a time with random delay between requests
print(followers)