Created
November 4, 2015 21:55
-
-
Save elliotforbes/3543f3f8c573c7e53698 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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