Created
September 25, 2018 16:07
-
-
Save DFoly/a411d3a243bf54b099ccc5d927a2796a to your computer and use it in GitHub Desktop.
main method
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
| if __name__== '__main__': | |
| auth = tweepy.OAuthHandler(consumer_key, consumer_secret) | |
| auth.set_access_token(access_token, access_token_secret) | |
| api =tweepy.API(auth, wait_on_rate_limit=True) | |
| # create instance of Streamlistener | |
| listener = Streamlistener(api = api) | |
| stream = tweepy.Stream(auth, listener = listener) | |
| track = ['golf', 'masters', 'reed', 'mcilroy', 'woods'] | |
| # choose what we want to filter by | |
| stream.filter(track = track, languages = ['en']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment