Bottom Page

Thread Rating:
  • 1 Vote(s) - 2 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 tweepy problem to to get a list of retweeters
#1
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
Quote
#2
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.
You like this post
Quote

Top Page

Possibly Related Threads...
Thread Author Replies Views Last Post
  tweepy:invalid or expired token weareux 2 2,230 Dec-03-2017, 07:27 PM
Last Post: micseydel
  Collecting Data from Twitter with Tweepy and MongoDB fatony 1 1,711 Apr-10-2017, 09:38 PM
Last Post: fatony

Forum Jump:


Users browsing this thread: 1 Guest(s)