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.72k stars 1.47k forks source link

[BUG] Traceback (most recent call last) #1300

Closed nizarganteng closed 4 years ago

nizarganteng commented 4 years ago

Example file

If you ran an example file specify it here.

Describe the bug

A clear and concise description of what the bug is.

Log

C:\Users\nizar\examples\comment>python comment_hashtags.py comments.txt ceramah videoislam fotoislam
2020-02-21 06:15:38,384 - INFO - Instabot version: 0.107.0 Started
2020-02-21 06:15:38,385 - DEBUG - Bot imported from C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot.py
Which account do you want to use? (Type number)
1: myinstagramusername
0: add another account.
-1: delete all accounts.
1
2020-02-21 06:15:40,005 - INFO - PRE-LOGIN FLOW!...
2020-02-21 06:15:41,361 - DEBUG - POST to endpoint: accounts/read_msisdn_header/ returned response: <Response [200]>
2020-02-21 06:15:43,718 - DEBUG - POST to endpoint: launcher/sync/ returned response: <Response [200]>
2020-02-21 06:15:45,107 - DEBUG - POST to endpoint: qe/sync/ returned response: <Response [200]>
2020-02-21 06:15:47,461 - DEBUG - POST to endpoint: attribution/log_attribution/ returned response: <Response [200]>
2020-02-21 06:15:48,812 - DEBUG - POST to endpoint: accounts/contact_point_prefill/ returned response: <Response [200]>
2020-02-21 06:15:51,981 - DEBUG - POST to endpoint: accounts/login/ returned response: <Response [400]>
2020-02-21 06:15:51,981 - DEBUG - Responsecode indicates error; response content: b'{"message": "challenge_required", "challenge": {"url": "https://i.instagram.com/challenge/13871646040/oBAg5Ss6aR/", "api_path": "/challenge/13871646040/oBAg5Ss6aR/", "hide_webview_header": true, "lock": true, "logout": false, "native_flow": true}, "status": "fail", "error_type": "checkpoint_challenge_required"}'
2020-02-21 06:15:51,984 - ERROR - Request returns 400 error!
2020-02-21 06:15:51,986 - INFO - Instagram's error message: challenge_required
2020-02-21 06:15:51,987 - INFO - Error type: checkpoint_challenge_required
2020-02-21 06:15:51,988 - INFO - Checkpoint challenge required...
2020-02-21 06:15:51,995 - INFO - Going to comment medias by ceramah hashtag
Traceback (most recent call last):
  File "comment_hashtags.py", line 32, in <module>
    bot.comment_hashtag(hashtag)
  File "C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot.py", line 920, in comment_hashtag
    return comment_hashtag(self, hashtag, amount)
  File "C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot_comment.py", line 110, in comment_hashtag
    medias = self.get_total_hashtag_medias(hashtag, amount)
  File "C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot.py", line 582, in get_total_hashtag_medias
    return get_total_hashtag_medias(self, hashtag, amount, filtration)
  File "C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot_get.py", line 139, in get_total_hashtag_medias
    medias = self.api.get_total_hashtag_feed(hashtag, amount)
  File "C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\api\api.py", line 1429, in get_total_hashtag_feed
    self.get_hashtag_feed(hashtag_str, next_max_id)
  File "C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\api\api.py", line 1110, in get_hashtag_feed
    ).format(hashtag=hashtag, max_id=max_id, rank_token=self.rank_token)
  File "C:\Users\nizar\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\api\api.py", line 584, in rank_token
    return "{}_{}".format(self.user_id, self.uuid)
  File "C:\Users\nizar\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: cd examples\comment python comment_hashtags.py comments.txt ceramah videoislam fotoislam

Expected behavior

A clear and concise description of what you expected to happen.

Additional context

Add any other context about the problem here.

Version

Python version (Python 3.8.1): OS: Win 10

duplicate-issues[bot] commented 4 years ago

Hey @nizarganteng,

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