How to only get User IDs from api.retweets()

retweet

#1

Hey!

I’m using Tweepy and trying to get a list of users who retweeted a tweet.

using api.retweets(tweetID) returns a large amount of JSON that seems overkill. Is there a way that I can just get the userIDs into a list, or loop through the JSON and add them into a list?

Thank you!


#2

Ahh, i was using api.retweets() instead of api.retweeters()

Merry Christmas everyone!


#3

I am getting empty list for the same query? Can any one tell me the possible problem. I am calling the function as follows
retweet_obj = api.retweets(tweet_id)
print(json.dumps(retweet_obj,indent=1))