Skip to content

Instantly share code, notes, and snippets.

View jnawjux's full-sized avatar

John jnawjux

  • Seattle, WA
View GitHub Profile
# Import packages and config
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from config import consumer_key, consumer_secret, access_token, access_token_secret
import datetime
import csv
# Takes tweets and a designated csv file and writes them to it.
from tweepy.streaming import StreamListener
from tweepy import OAuthHandler
from tweepy import Stream
from config import consumer_key, consumer_secret, access_token, access_token_secret
import datetime
import csv
import sys
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)\