Reputation: 11
This is an example of how my code in tweepy looks like:
api = tweepy.API(auth, wait_on_rate_limit=True, wait_on_rate_limit_notify=True, compression=True)
random = random.randint(1,1000)
for tweet in tweepy.Cursor(api.search, q='twitter', lang='en', result_type='recent').items():
if not (tweet.retweeted) and 'RT @' not in (tweet.text):
api.update_status('@' + tweet.user.screen_name + ' ' + str(random) + ': test', in_reply_to_status_id = tweet.id_str)
print('Replied to the tweet!')
sleep (900)
The code works but for some reason, after a while of running the code, my tweets go missing from the search. Before it goes missing from the search, it goes missing from the tweet I replied to. I don't really know why this is happening.
Upvotes: 0
Views: 590
Reputation: 1
Tweets go missing from search when you are either tweeting too much or someone reports your tweets too often. Twitter is just based off of algorithms that detect if you are tweeting the same thing over and over (spamming), following / unfollowing too quickly or retweeting too much. Give it a rest it should clear after 72 hours max. I believe the term is called “shadow banned”.
Upvotes: 0
Reputation: 1386
The Twitter search function is optimized to show recent tweets (and probably especially so when you have the arg result_type='recent'
). The tweet still exists but it is not showing up in the search because it is no longer recent enough. If you go into the twitter browser I am sure the tweets and replies are still there (navigate to the user's timeline to find it easiest). Or, try removing the result_type='recent'
.
Hope this helps.
Upvotes: 1