dilame / instagram-private-api

NodeJS Instagram private API SDK. Written in TypeScript.
MIT License
5.93k stars 1.14k forks source link

Trying to get all of my following(7500) but gets 7395 instead #1042

Open hare1994 opened 4 years ago

hare1994 commented 4 years ago

General Question

Form

Put an [x] if you meet the condition, else leave [ ].

Question

Hi

I am trying to get all of my following

I follow 7500 people(the maximum allowed)

but when i tried to get them all i get only 7395

The 105 missing is the 105 users whom i followed first (5 years ago)

This is the code

friendshipsRouter.get('/getAllUserFollowingFast/:username', (req,res ,next) => {
    (async() => {
        const targetUser = await ig.user.searchExact(req.params.username);
        let feed = ig.feed.accountFollowing(targetUser.pk);
        let allResults = [];
        let currentPage;
        do {
            currentPage = await feed.items(); //
            currentPage.users.forEach(user => {
                allResults.push(user.username);
            });
        }
        while(feed.isMoreAvailable());

        res.send({allFollowing:allResults, number : allResults.length});
    })()
});

Does anyone have an idea how to solve this?

lazyboy1801 commented 4 years ago

i have same issues

tinmarin commented 4 years ago

Same issue. The followers count is not accurate. Any ideas??

Nerixyz commented 4 years ago

Same issue. The followers count is not accurate. Any ideas??

Does it happen in the app?

lazyboy1801 commented 4 years ago

The error occurs when the number of followers is over 2k. Some followers are duplicated.

aliozcan commented 4 years ago

Same issue. The followers count is not accurate. Any ideas??

Does it happen in the app?

I tried to get all followers from the Instagram web UI by scrolling down to the end in the followers link but there are no duplicates there and the number of followers and the list of users match.

The error occurs when the number of followers is over 2k. Some followers are duplicated.

This is wrong. I also get duplicate followers when the number of followers is around 300.

skinnynpale commented 2 years ago

up!

asab1rd commented 2 years ago

up!