Python Forum
tweepy problem to to get a list of retweeters - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: tweepy problem to to get a list of retweeters (/thread-5572.html)



tweepy problem to to get a list of retweeters - komarek - Oct-11-2017

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


RE: tweepy problem to to get a list of retweeters - aguro90 - Jun-05-2018

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.