Python Forum

Full Version: I need help with an instagram bot
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
So basically I have this bot, but it keeps on crashing. Here is the code... the _____ is personal names that i dont want to be used in public. I am not sure what the underlined script is. Please help me :huh: :huh:


"Trying to login as _____...

______ login success!
Blacklisted user _____ added with ID: 11341294
Traceback (most recent call last):
  File "C:\Users\______\Desktop\example.py", line 18, in <module>
    log_mod=0)
  File "C:\Users\______\Desktop\instabot.py-master\instabot.py", line 157, in __init__
    self.populate_user_blacklist()
  File "C:\Users\_____\Desktop\instabot.py-master\instabot.py", line 167, in populate_user_blacklist
    id_user = all_data['user']['media']['nodes'][0]['owner']['id']
IndexError: list index out of range
>>> "
Quote:Here is the code...
This all looks like output and no code provided. Use quote to post output examples...not underlines.

Quote:the _____ is personal names that i dont want to be used in public.
names/usernames are normally not sensitive data

Quote:
all_data['user']['media']['nodes']
it looks like nodes is an empty list

for example
>>> a = {'test':[]}
>>> a['test'][0]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: list index out of range
(Oct-02-2016, 04:46 PM)metulburr Wrote: [ -> ]
Quote:the _____ is personal names that i dont want to be used in public.
names/usernames are normally not sensitive data
They can be. But then they can be replaced by something more readable than underscores :)