Skip to content

Instantly share code, notes, and snippets.

@elliotforbes
Created November 4, 2015 21:55
Show Gist options
  • Save elliotforbes/3543f3f8c573c7e53698 to your computer and use it in GitHub Desktop.
Save elliotforbes/3543f3f8c573c7e53698 to your computer and use it in GitHub Desktop.
def auto_fav(q, count):
# create an array of tweets of length = count
# that contain the string q.
result = search_tweets(q, count)
# parses the results and gets the
a = result['statuses'][0]['user']['screen_name']
print a
success = 0
for tweet in result['statuses']:
if fav_tweet(tweet) is not None:
success += 1
print "We Favorited a total of %i out of %i tweets" % (success,
len(result['statuses']))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment