subzeroid / instagrapi

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

[BUG] instagrapi library is broken. #933

Open ghuser9822 opened 1 year ago

ghuser9822 commented 1 year ago

It is not working at all.

Traceback (most recent call last):
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request
    response.raise_for_status()
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 1022, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://i.instagram.com/api/v1/accounts/login/

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 434, in private_request
    self._send_private_request(endpoint, **kwargs)
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 330, in _send_private_request
    raise ChallengeRequired(**last_json)
instagrapi.exceptions.ChallengeRequired: challenge_required

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\Lenovo\Desktop\All Codes\instatweet.py", line 126, in <module>
    asyncio.run(main())
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\asyncio\runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 641, in run_until_complete
    return future.result()
  File "C:\Users\Lenovo\Desktop\All Codes\instatweet.py", line 70, in main
    upload_post_photo(jpg_name,captions)
  File "C:\Users\Lenovo\Desktop\All Codes\instatweet.py", line 34, in upload_post_photo
    cl.login(IG_USERNAME, IG_PASSWORD)
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\auth.py", line 391, in login
    logged = self.private_request("accounts/login/", data, login=True)
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\private.py", line 445, in private_request
    self.challenge_resolve(self.last_json)
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\challenge.py", line 78, in challenge_resolve
    return self.challenge_resolve_simple(challenge_url)
  File "C:\Users\Lenovo\AppData\Local\Programs\Python\Python310\lib\site-packages\instagrapi\mixins\challenge.py", line 425, in challenge_resolve_simple
    raise ChallengeUnknownStep(f'ChallengeResolve: Unknown step_name "{step_name}" for "{self.username}" in challenge resolver: {self.last_json}')
instagrapi.exceptions.ChallengeUnknownStep: ChallengeResolve: Unknown step_name "select_contact_point_recovery" for "xxxxxxx" in challenge resolver: 
therealbdawg commented 1 year ago

no issues been running my bot the last 10 hours

zepvalue commented 1 year ago

challenges should be handled differently. I would strongly suggest to first log in on a mobile phone and then use the bot.

challenge_required it's a n MFA code or simply changing the password will help bypass https://adw0rd.github.io/instagrapi/usage-guide/challenge_resolver.html

Please read the readme before posting in issues

ghuser9822 commented 1 year ago

challenges should be handled differently. I would strongly suggest to first log in on a mobile phone and then use the bot.

challenge_required it's a n MFA code or simply changing the password will help bypass https://adw0rd.github.io/instagrapi/usage-guide/challenge_resolver.html

Please read the readme before posting in issues

I implemented email challenge but i am getting this as a response despite correct gmail password.

Traceback (most recent call last):
  File "C:\Users\Lenovo\Desktop\All Codes\xfinsta.py", line 134, in <module>
    cl.challenge_code_handler = challenge_code_handler(IG_USERNAME,Cn\Python310\lib\imaplib.py", line 612, in login
    raise self.error(dat[-1])imaplib.error: b'[AUTHENTICATIONFAILED] Invalid credentials (Failure)' 
ghuser9822 commented 1 year ago

I found few pointers. This issue is because of gmail not letting other apps login.

https://stackoverflow.com/a/25447206

Still unable to find solution. How you guys resolving it ?