question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Profile.get_followers() is not getting 100% of followers

See original GitHub issue

Describe the bug After trying to fetch all the followers of accounts, I’ve seen it always lacks ~1 follower per each 200 followers. I’m not sure what is the problem cause it’s not showing any kind of exception when querying the data. I try looking manually on the IG web interface at the followers that aren’t being fetched and they are:

  1. Public
  2. Some are being followed by the account in question
  3. Some have been followers for more than 1 month

To Reproduce

username = 'username'
L = instaloader.Instaloader()
try:
    L.load_session_from_file(username)
except instaloader.BadCredentialsException:
    L.login(username, 'credentiales-password')
    L.save_session_to_file()
except instaloader.TwoFactorAuthRequiredException:
    L.two_factor_login()
    L.save_session_to_file()
pipaslastres = instaloader.Profile.from_username(L.context, 'pipaslastres')
pipaslastres_cls = [f_cls for f_cls in pipaslastres.get_followers()]
pipaslastres_followers = [{'a': 'pipaslastres', 'f': f.username} for f in pipaslastres_cls]

len(pipaslastres_followers) # 1469
# real followers count according to IG interface = 1474

Expected behavior Download 100% of followers

Instaloader version 4.6.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
Thammuscommented, Mar 13, 2021

I have added my date of birth in my account settings of Instagram. When executing your code snippet, all of the reported 1666 followers get fetched by Profile.get_followers(). Doing the same procedure with an Instagram account that is not age-verified, only 1646 followers get fetched.

L = instaloader.Instaloader()
L.load_session_from_file('thammus')

pipaslastres = instaloader.Profile.from_username(L.context, 'pipaslastres')
pipaslastres_cls = [f_cls for f_cls in pipaslastres.get_followers()]
pipaslastres_followers = [{'a': 'pipaslastres', 'f': f.username} for f in pipaslastres_cls]

pipaslastres.followers      # output: 1666
len(pipaslastres_followers) # output: 1666

Not age-verified account:

pipaslastres.followers      # output: 1666
len(pipaslastres_followers) # output: 1646
0reactions
Thammuscommented, Mar 27, 2021

Would you mind sharing your new observations? Do the numbers match?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why You're Not Gaining Followers On Instagram + What To ...
It is important to reply to the comments you get because if you don't, your followers won't feel valued and won't keep doing...
Read more >
How to Get Followers on Twitter in 8 Easy Steps - Neil Patel
100K followers is great — but not if they don't care about your business. 1. Optimize Your Twitter Profile to Attract Twitter Followers....
Read more >
GET followers/ids | Docs | Twitter Developer Platform
GET followers /ids. Returns a cursored collection of user IDs for every user following the specified user. At this time, results are ordered...
Read more >
5 Reasons Your Instagram Growth Is “Stuck” (And How To Fix It)
Being stagnant or “stuck” on Instagram is a sign that something needs to change. The first thing most social media managers, influencers and ......
Read more >
Get More Real Instagram Followers in 10 Steps | Sprout Social
Before you worry about how to get followers, consider how your Instagram account is set up first. Ask yourself: does your profile “look...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found