I want to scrape the data from Instagram different public and private accounts. But when I run the following code.

from instagramy import Instagram # Connecting the profile user = Instagram("ihtishamKhattak") # printing the basic details like # followers, following, bio print(user.is_verified()) print(user.popularity()) print(user.get_biography()) # return list of dicts posts = user.get_posts_details() print('\n\nLikes', 'Comments') for post in posts: likes = post["likes"] comments = post["comment"] print(likes,comments) 

import error

1

2 Answers

You can have a look at the instagramy pypi page.

There is no Instagram python module. Also make sure, that you have no script calles instagramy.py

change your script to

from instagramy import InstagramUser # Connecting the profile user = InstagramUser("ihtishamKhattak") 

Beware that this might work only for few request if you do not provide a Session ID.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy