Reputation: 414
I'm using instabot python module to work with instagram API, I'm trying to search a username but when I try It always returns True instead of result value, this is my code:
bot = Bot()
bot.login(username="mytest_user", password="my_pass")
users = bot.searchUsers(query="test")
print "==========%s" % users
and it returns:
2017-10-26 01:23:48,153 - INFO - Login success as mytest_user!
========== True
am I missing something?
Upvotes: 1
Views: 251
Reputation: 1258
bot.searchUsers() returns boolean.
your function must like this:
bot.searchUsers('your_query_to_search_usernames')
jsondata = bot.LastJson
for username in jsondata['users']:
print(username['username']
It will work.
Upvotes: 1