Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in getting user information #10

Open
pavi2410 opened this issue Nov 15, 2021 · 5 comments
Open

Error in getting user information #10

pavi2410 opened this issue Nov 15, 2021 · 5 comments

Comments

@pavi2410
Copy link

TypeError: Cannot read property '0' of undefined
    at getUserData (/home/runner/sociorank/node_modules/instagram-scraper-api/helpers/user.helper.js:19:152)
    at InstagramScraper.user (/home/runner/sociorank/node_modules/instagram-scraper-api/index.js:12:46)
@pavi2410
Copy link
Author

pavi2410 commented Nov 15, 2021

instagram.userScraper.user(username).then(data => {
  console.log(data.entry_data)
})

returns

{
  LoginAndSignupPage: [
    {
      captcha: [Object],
      gdpr_required: false,
      tos_version: 'row',
      username_hint: ''
    }
  ]
}

There is no ProfilePage property present.

@bartholomej
Copy link
Owner

hi @pavi2410, I'm afraid instagram is now testing a feature where it stops showing user profiles without logging in, so the script may not see the profile at all.

Try opening some user's profile on instagram.com (in anonymous browser mode). If it forces you to log in, then this script can't work anymore :(

Let me know.

@pavi2410
Copy link
Author

Yup, I tried every possible way to scrape without authentication, but nothings seems to work. I have also found that the requests must be made in proximity to the user's current location. Not knowing that fact, I wasted a lot of time.

@N0nick1597
Copy link

Maybe someone found the way to login and use this code with it?

@gurubobnz
Copy link

We're using this https://github.com/pgrimaud/instagram-user-feed which supports fetching after login, but even then we're finding that Instagram catches up with us and blocks the IP we are accessing the info from. Until Instagram supports this natively we're going to be playing a chasing game trying to pretend we're all web browsers and real people :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants