Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
#!/usr/bin/env python3
import sys
from twarc import Twarc
screen_name = sys.argv[1]
twitter = Twarc()
tweets = 0
retweets = 0
for tweet in twitter.timeline(screen_name=screen_name):
tweets += 1
if 'retweeted_status' in tweet:
retweets += 1
print('{0} has a retweet/tweet ratio of {1:.3f}'.format(screen_name, retweets/tweets))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.