Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
"""
Getting rid of some garbage on the internet.
"""
import time
import twitter
api = twitter.Api(consumer_key='',
consumer_secret='',
access_token_key='',
access_token_secret='')
def all_dem_tweets():
while True:
timeline = api.GetUserTimeline(screen_name='thechriskiehl')
if timeline:
yield from [x.id_str for x in timeline]
else:
break
for tweet_id in all_dem_tweets():
print('Deleting tweet id', tweet_id)
api.DestroyStatus(tweet_id)
# throttle ourselves a wee bit
time.sleep(.6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment