コード例 #1
0
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
# comment_b = instagram.add_comment(mediaId, 'cool man', comment)
#
# instagram.delete_comment(mediaId, comment)

コード例 #2
0
from context import Instagram # pylint: disable=no-name-in-module

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

instagram.follow('user_id')
instagram.unfollow('user_id')