koenrh / delete-tweets

Delete tweets from your timeline.
ISC License
791 stars 108 forks source link

i have run the script to delete 20000+ tweet, but there is still 1090 tweet which can not be delete #56

Open flied opened 4 years ago

flied commented 4 years ago

i have run this in my server , and 20000+ tweets had been deleted. but there are always 1090 tweets left , and i can not see them on the twitter.com website, there is only the number shows. is there the script bug or twitter's bug?

heinrich-ulbricht commented 4 years ago

I noticed this as well. My theory so far is that this might be retweets of suspended accounts that still surface in the tweet count. But that's pure speculation and I'd also like to know what's going on.

koenrh commented 4 years ago

Interesting. I wonder if in that case the total number of tweets in your archive match the count on your Twitter profile. If they do match, then we should see some errors on the Destroy API call. It would be nice if the script would track some stats (e.g. number of successful/failed delete actions).

heinrich-ulbricht commented 4 years ago

I'll check this as soon as the current export expires so I can create a new one. Then I'll compare the counts.

akilangh commented 4 years ago

@heinrich-ulbricht is sort of right. If the account is protected, twitter doesn't allow us to delete. If the account is suspended also I think same happens. I followed some of the error messages and found that in case of following error message the account i protected:

delete tweet 651609564060758016                                                         
Exception: [{u'message': u'Sorry, you are not authorized to see this status.', u'code': 
179}]  

Of course I can see full text of tweet in tweet.js by searching for id:

 "id" : "651609564060758016",
  "created_at" : "Wed Oct 07 04:06:41 +0000 2015",
  "favorited" : false,
  "full_text" : "RT @arvind_et: CPM-\"The resources in m...<truncated>

but the script cannot delete it and I cannot see in twitter interface(obviously). I think solution is for me to follow them, gain access, delete and then unfollow. Bad API from twitter if you ask me.

akilangh commented 4 years ago

OK, I'm happy(sad?) to report that @heinrich-ulbricht is fully right. This error message is thrown by the script when account is suspended: Exception: [{u'message': u'Sorry, that page does not exist.', u'code': 34}]

koenrh commented 4 years ago

@akilan27 Interesting. Thank you for confirming.

So, it looks like, based on the API response, you cannot tell whether the tweet was either previously deleted or that it was a retweet of a tweet form a protected account?

akilangh commented 4 years ago

If it is from protected account you can tell from API response: [{u'message': u'Sorry, you are not authorized to see this status.', u'code': 179}]

But you cannot distinguish deleted tweet and tweets from suspended account with both returning: Exception: [{u'message': u'Sorry, that page does not exist.', u'code': 34}]

kvreem commented 4 years ago

@akilan27 so essentially it will be impossible to get the tweet count to zero :/ ?