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] KeyError: 'ds_user_id' when launching Follower function on multi_script_CLI.py #1331

Closed andreagiugio closed 4 years ago

andreagiugio commented 4 years ago

Example file

multi_script_CLI.py file into instabot-master\examples

Describe the bug

Getting error KeyError: 'ds_user_id'

Log

        1.Follow
        2.Like
        3.Comment
        4.Unfollow
        5.Block
        6.Setting
        7.Exit

What would you like to do?
1

        1. Follow from hashtag
        2. Follow followers
        3. Follow following
        4. Follow by likes on media
        5. Main menu

How do you want to follow?
1

            1.Insert hashtag
            2.Use hashtag database

1
Insert hashtags separated by spaces
Example: cat dog
what hashtags?
ragazza
Begin following: ragazza
2020-02-27 17:07:26,203 - ERROR - 'ds_user_id'
Traceback (most recent call last):
  File "C:\Users\Maneat\Desktop\Lavoro\Andrea\Bot Instagram\instabot-master\examples\multi_script_CLI.py", line 662, in <module>
    menu()
  File "C:\Users\Maneat\Desktop\Lavoro\Andrea\Bot Instagram\instabot-master\examples\multi_script_CLI.py", line 233, in menu
    menu_follow()
  File "C:\Users\Maneat\Desktop\Lavoro\Andrea\Bot Instagram\instabot-master\examples\multi_script_CLI.py", line 286, in menu_follow
    users = bot.get_hashtag_users(hashtag)
  File "C:\Users\Maneat\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot.py", line 597, in get_hashtag_users
    return get_hashtag_users(self, hashtag)
  File "C:\Users\Maneat\AppData\Local\Programs\Python\Python38-32\lib\site-packages\instabot\bot\bot_get.py", line 194, in get_hashtag_users
    if not self.api.get_hashtag_feed(hashtag):
  File "C:\Users\Maneat\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\Maneat\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\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'
2020-02-27 17:07:26,217 - DEBUG - error, retry

To Reproduce

(EXAMPLE:) Steps to reproduce the behavior:

  1. Run file: multi_script_CLI.py
  2. Select 'Follow'
  3. Select 'Follow from hashtag'

Expected behavior

Following users for given hashtag

Additional context

Add any other context about the problem here.

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