I use the Twitter streaming API to retrieve the tweets that a certain user writes. To do so, I use
stream.filter(follow=['user_id'])
However, I do not only get the tweets of this user ID, but I guess also replies, retweets (?), I am not quite sure what all these tweets are that I get, but actually I only want to get those tweets which this single user writes. Is there a way I can exclude the other messages?
Also, I want to get all tweets that are directed at this person, so all tweets where this account is mentioned. Consequently, I would use. However, here I have the same problem as I get quite some tweets that do not only meet this criterion.
stream.filter(track=["@screen_name"])
I read that I might implement something like
def on_status(self, status):
if status.retweeted_status:
return
print(status)
but I do not even know what exactly the code delivers me neither what I have to exclude, so I would be really thankful if you could help me with my problem.