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

Getting error in follow_user_followers.py when i execute the followers that have more than 100k Followers #596

Closed zeroyjk closed 5 years ago

zeroyjk commented 6 years ago

Please follow the guide below


Before submitting an issue, make sure you have:

Purpose of your issue?


The following sections requests more details for particular types of issues, you can remove any section (the contents between the triple ---) not applicable to your issue.


For a bug report, you must include the Python version used, code that will reproduce the error, and the error log/traceback.

Paste the output of python -V here:

Code:

"""
    instabot example

    Workflow:
        Follow user's followers by username.
"""

import argparse
import os
import sys

sys.path.append(os.path.join(sys.path[0], '../'))
from instabot import Bot

parser = argparse.ArgumentParser(add_help=True)
parser.add_argument('-u', type=str, help="username")
parser.add_argument('-p', type=str, help="password")
parser.add_argument('-proxy', type=str, help="proxy")
parser.add_argument('users', type=str, nargs='+', help='users')
args = parser.parse_args()

bot = Bot()
bot.login(username=args.u, password=args.p,
          proxy=args.proxy)

for username in args.users:
    bot.follow_followers(username)

Error/Debug Log:

Traceback (most recent call last):
  File "follow_user_followers.py", line 27, in <module>
    bot.follow_followers(username)
  File "/usr/local/lib/python2.7/dist-packages/instabot/bot/bot.py", line 471, in follow_followers
    return follow_followers(self, user_id, nfollows)
  File "/usr/local/lib/python2.7/dist-packages/instabot/bot/bot_follow.py", line 76, in follow_followers
    followers = self.get_user_followers(user_id, nfollows)
  File "/usr/local/lib/python2.7/dist-packages/instabot/bot/bot.py", line 356, in get_user_followers
    return get_user_followers(self, user_id, nfollows)
  File "/usr/local/lib/python2.7/dist-packages/instabot/bot/bot_get.py", line 181, in get_user_followers
    followers = self.api.get_total_followers(user_id, nfollows)
  File "/usr/local/lib/python2.7/dist-packages/instabot/api/api.py", line 610, in get_total_followers
    user_id, amount, 'followers')
  File "/usr/local/lib/python2.7/dist-packages/instabot/api/api.py", line 585, in get_total_followers_or_followings
    get(user_id, next_max_id)
  File "/usr/local/lib/python2.7/dist-packages/instabot/api/api.py", line 427, in get_user_followers
    return self.send_request(url)
  File "/usr/local/lib/python2.7/dist-packages/instabot/api/api.py", line 171, in send_request
    self.last_json = json.loads(response.text)
  File "/usr/lib/python2.7/json/__init__.py", line 339, in loads
    return _default_decoder.decode(s)
  File "/usr/lib/python2.7/json/decoder.py", line 364, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/lib/python2.7/json/decoder.py", line 380, in raw_decode
    obj, end = self.scan_once(s, idx)
ValueError: Unterminated string starting at: line 1 column 47756 (char 47755)
2018-07-20 11:37:06,757 - INFO - Bot stopped. Worked: 0:01:51.336802
2018-07-20 11:37:06,757 - INFO - Total requests: 516

I have try many time but still not working, im using ubuntu 18.04 LTS

kintaro1981 commented 6 years ago

as you can see here: https://github.com/instagrambot/instabot/issues/593

I solved with this: https://github.com/instagrambot/instabot/commit/9f9c054db0bcf6931a9a9a98815a8919e19ba6b4

but now I have this problem here: https://github.com/instagrambot/instabot/issues/593#issuecomment-406644399

kintaro1981 commented 6 years ago

@zeroyjk have you solved?

stale[bot] commented 5 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.