'How to differentiate Twitter replies from initial Tweet thread
I built a simple script that uses the Tweepy API to download Tweets from a given profile.
It all works fine and dandy, but I do not want to download replies to Tweets; I'd like to only download the initial tweet.
Say I follow profile X. X posts something. Then Y replies. Then X replies again. I'd like to discard both Y's and X's replies and only keep X's original post.
Any thoughts?
Solution 1:[1]
With Twitter API v1.1, you can use API.user_timeline's exclude_replies paramter.
With Twitter API v2, you can use Client.get_users_tweets'sexclude parameter.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Harmon758 |
