Skip to content

Instantly share code, notes, and snippets.

@jnawjux
Created September 20, 2019 23:05
Show Gist options
  • Save jnawjux/e325ecf453fdc276b91d4f419114fe23 to your computer and use it in GitHub Desktop.
Save jnawjux/e325ecf453fdc276b91d4f419114fe23 to your computer and use it in GitHub Desktop.
import got3 as got
def get_tweets(start_date, end_date, team_name, location):
"""
Return tweets for an individual day, based on search criteria
"""
tweetCriteria = got.manager.TweetCriteria()\
.setQuerySearch(team_name)\
.setSince(start_date)\
.setUntil(end_date)\
.setWithin(location)\
.setTopTweets(True)\
.setMaxTweets(500)
return got.manager.TweetManager.getTweets(tweetCriteria)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment