dilame / instagram-private-api

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

the feed account.followers gives the same output #1241

Open BranchScope opened 4 years ago

BranchScope commented 4 years ago

Is there any way to get a different output from the feed account.followers? or a way to remove the max id limit?

Nerixyz commented 4 years ago

What's your code? What do you expect? What's the actual output? How am I supposed to answer this question?

BranchScope commented 4 years ago

The output is everytime the first tot (the max id number) followers of a page, why it doesn't shuffle or something?

Nerixyz commented 4 years ago

The output is everytime the first tot (the max id number) followers of a page, why it doesn't shuffle or something?

What's your code?

BranchScope commented 4 years ago

The output is everytime the first tot (the max id number) followers of a page, why it doesn't shuffle or something?

What's your code?

const IgApiClient = require('instagram-private-api');

process.env.IG_USERNAME = "USERNAME";
process.env.IG_PASSWORD = "PASSWORD";

(async () => {

  const ig = new IgApiClient.IgApiClient();
  ig.state.generateDevice(process.env.IG_USERNAME);
  //ig.state.proxyUrl = process.env.IG_PROXY;
  const auth = await ig.account.login(process.env.IG_USERNAME, process.env.IG_PASSWORD);

const bruh = await ig.feed.accountFollowers(23135362941).items(); //the id is of a public page
const ids = bruh.map(x => x.pk);

console.log(ids);

})();
Nerixyz commented 4 years ago

You're always requesting the first page. You have to call .items() multiple times to get more pages (until .isMoreAvailable() returns false).

kadupenido commented 3 years ago

I am in the same situation, did you get any solution?

Thanks.