ohld / igbot

🐙 Free scripts, bots and Python API wrapper. Get free followers with our auto like, auto follow and other scripts!
https://hikerapi.com/p/N2P6iqiM
Apache License 2.0
4.69k stars 1.47k forks source link

[BUG] Error during execution of whitelist_generator.py #1328

Closed andreagiugio closed 4 years ago

andreagiugio commented 4 years ago

Example file

I have run file "whitelist_generator.py" inside directory examples\black-whitelist

Describe the bug

Error during execution of script

Log

2020-02-27 10:20:04,312 - INFO - PRE-LOGIN FLOW!... 
2020-02-27 10:20:05,627 - DEBUG - POST to endpoint: accounts/read_msisdn_header/ returned response: <Response [200]>
2020-02-27 10:20:07,845 - DEBUG - POST to endpoint: launcher/sync/ returned response: <Response [200]>
2020-02-27 10:20:10,094 - DEBUG - POST to endpoint: qe/sync/ returned response: <Response [200]>
2020-02-27 10:20:11,344 - DEBUG - POST to endpoint: attribution/log_attribution/ returned response: <Response [200]>
2020-02-27 10:20:13,594 - DEBUG - POST to endpoint: accounts/contact_point_prefill/ returned response: <Response [200]>
2020-02-27 10:20:15,296 - DEBUG - POST to endpoint: accounts/login/ returned response: <Response [400]>
2020-02-27 10:20:15,296 - DEBUG - Responsecode indicates error; response content: b'{"message": "challenge_required", "challenge": {"url": "https://i.instagram.com/challenge/2165657/JIMPwYpEgF/", "api_path": "/challenge/2165657/JIMPwYpEgF/", "hide_webview_header": true, "lock": true, "logout": false, "native_flow": true}, "status": "fail", "error_type": "checkpoint_challenge_required"}'
2020-02-27 10:20:15,296 - ERROR - Request returns 400 error!
2020-02-27 10:20:15,296 - INFO - Instagram's error message: challenge_required
2020-02-27 10:20:15,296 - INFO - Error type: checkpoint_challenge_required
2020-02-27 10:20:15,296 - INFO - Checkpoint challenge required...
This script will generate whitelist.txt file with userswho will not be unfollowed by bot. Press Y to add user to whitelist. Ctrl + C to exit.

`bot.following` is empty, will download.
Traceback (most recent call last):
  File "C:\Users\Maneat\Desktop\Lavoro\Andrea\Bot Instagram\instabot-master\examples\black-whitelist\whitelist_generator.py", line 23, in <module>
    your_following = bot.following
  File "C:\Users\Maneat\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot.py", line 328, in following
    self._following = self.get_user_following(self.user_id)
  File "C:\Users\Maneat\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot.py", line 285, in user_id
    return self.api.user_id
  File "C:\Users\Maneat\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\api\api.py", line 580, in user_id
    return self.cookie_dict["ds_user_id"]
KeyError: 'ds_user_id'

To Reproduce

(EXAMPLE:) Steps to reproduce the behavior:

  1. Run file:
  2. Edit '...'
  3. Run '....'

Expected behavior

Additional context

Version

Python version (python -v): 3.8 32-bit OS: Windows 10

duplicate-issues[bot] commented 4 years ago

Hey @andreagiugio,

We did a quick check and this issue looks very darn similar to

This could be a coincidence, but if any of these issues solves your problem then I did a good job :smile:

If not, the maintainers will get to this issue shortly.

Cheers, Your Friendly Neighborhood ProBot

bruvv commented 4 years ago

https://github.com/instagrambot/instabot/issues/1317