subzeroid / instagrapi

🔥 The fastest and powerful Python library for Instagram Private API 2024
https://hikerapi.com/p/bkXQlaVe
MIT License
4.38k stars 686 forks source link

[BUG] media_likers is not returning a full list #657

Closed emmacooperpeterson closed 2 years ago

emmacooperpeterson commented 2 years ago

Describe the bug In some cases, media_likers returns a list that is shorter than the actual like count. Anecdotally, it seems to happen for posts with over 1,000 likes.

To Reproduce

url = "https://www.instagram.com/p/CcGEVbTLkCu/"  # post with 11198 likes
media_pk = client.media_pk_from_url(url)
media_id = client.media_id(media_pk)
likers = client.media_likers(media_id)
len(likers)  # 1030

info = client.media_info(media_pk)
info.like_count  # 11198

# repeat with a post that has < 1000 likes
url = "https://www.instagram.com/p/CbVLXCNr36a/"
# repeat the same -- returns correct result

Expected behavior I was expecting the length of the result from media_likers to match the like_count from media_info.

Desktop (please complete the following information):

adw0rd commented 2 years ago

@emmacooperpeterson this is an Instagram limitation, if you know how to get around it, you can send your PR

emmacooperpeterson commented 2 years ago

@adw0rd Ahh, got it – for some reason I thought I had seen the full list previously but I must have been imagining things :-) Thanks for the quick response!