Пример #1
0
print('Account info:')
print('Id', account.identifier)
print('Username', account.username)
print('Full name', account.full_name)
print('Biography', account.biography)
print('External Url', account.external_url)
print('Number of published posts', account.media_count)
print('Number of followers', account.followed_by_count)
print('Number of follows', account.follows_count)
print('Is private', account.is_private)
print('Is verified', account.is_verified)


#block unblock
print("block account and unblock")
instagram.block('adamw')
instagram.unblock('adamw')

#follow unfollow
print("follow and unfollow")
instagram.follow('adamw')
sleep(10)
instagram.unfollow('adamw')


#try add comment
#Does not work
# print("add comment")
# mediaId = '1874597980243548658'
# comment = instagram.add_comment(mediaId, 'nice!!')
# # replied to comment
Пример #2
0
from context import Instagram  # pylint: disable=no-name-in-module

instagram = Instagram()
instagram.with_credentials('', '', 'pathtocache')
instagram.login()

instagram.block('user_id')
instagram.unblock('user_id')