subzeroid / instagrapi

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

[BUG] new challenge type #931

Open ItzmeSwapy opened 2 years ago

ItzmeSwapy commented 2 years ago

Describe the bug New Login Challenges

To Reproduce

`Status 404: Endpoint /challenge/ does not exists Traceback (most recent call last): File "C:\Users\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request response.raise_for_status() File "C:\Users\rjenk\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 960, 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/feed/timeline/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Users\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\private.py", line 434, in private_request self._send_private_request(endpoint, kwargs) File "C:\Users\rjenk\AppData\Roaming\Python\Python310\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\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\private.py", line 298, in _send_private_request response.raise_for_status() File "C:\Users\rjenk\AppData\Local\Programs\Python\Python310\lib\site-packages\requests\models.py", line 960, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://i.instagram.com/api/challenge/

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\Bots\Instagram\basecode\emailchallenge_solver.py", line 18, in timeline=cl.get_timeline_feed() File "C:\Users\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\auth.py", line 215, in get_timeline_feed return self.private_request( File "C:\Users\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\private.py", line 445, in private_request self.challenge_resolve(self.last_json) File "C:\Users\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\challenge.py", line 78, in challenge_resolve return self.challenge_resolve_simple(challenge_url) File "C:\Users\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\challenge.py", line 364, in challenge_resolve_simple self._send_private_request(challenge_url, {"choice": "0"}) File "C:\Users\rjenk\AppData\Roaming\Python\Python310\site-packages\instagrapi\mixins\private.py", line 370, in _send_private_request raise ClientNotFoundError(e, response=e.response, **last_json) instagrapi.exceptions.ClientNotFoundError: 404 Client Error: Not Found for url: https://i.instagram.com/api/challenge/`

Expected behavior Should either throw a complete login but this is not a permanent ban as the account can be logged in by solving the challenge

Screenshots image

FranciscoDadone commented 2 years ago

Same issue here!