Examples

instaLooter also provides an API that can be used to extend the capabilities of instaLooter, to fit your needs more tightly or to integrate instaLooter to your program.

Get a set of users that commented a given profile

from instaLooter import InstaLooter
looter = InstaLooter(profile="targetprofile")

users = set()
for media in looter.medias(with_pbar=True):
   post_info = looter.get_post_info(media['code'])
   for comment in post_info['edge_media_to_comment']['edges']:
       user = comment['node']['owner']['username']
       users.add(user)

Get a set of users tagged in pictures of a given profile

from instaLooter import InstaLooter
looter = InstaLooter(profile="targetprofile")

users = set()
for media in looter.medias(with_pbar=True):
    post_info = looter.get_post_info(media['code'])
    for usertag in post_info['edge_media_to_tagged_user']['edges']:
        user = usertag['node']['user']['username']
        users.add(user)