Python Forum

Full Version: tweepy problem to to get a list of retweeters
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
so
i have a script that takes a timeline from user X and parse all his last tweets and print out a list of people that retweeted those tweets (for each one of them)

the code is something like this:

for tweet in api.user_timeline(screen_name = "XXXXX", count=20):
    print("TWEET:", tweet.text)
    for reTweet in api.retweets(tweet.id):
        print("USER:", reTweet.user.screen_name)
and it's working perfect
EXCEPT for the tweets that are actually not created by X but just Retweeted... in this case i have an empty list of retweeters.

do you know how to fix this?
Huh
Hi , you helped me with this code so I decide to help you.

When you take the tweets from the timeline its like the user write that tweet, so u have to find original tweet with the tweet.id and check for retweeters there.
I Hope I could help, and sorry for my english.