Last active
September 29, 2020 02:00
-
-
Save WillisN/21aec016519efbd420177073fcb3605c to your computer and use it in GitHub Desktop.
code
This file contains 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 get_tweets(): | |
url = 'https://stream.twitter.com/1.1/statuses/filter.json' | |
query_data = [('language', 'en'), ('locations', '-130,-20,100,50')] | |
query_url = url + '?' + '&'.join([str(t[0]) + '=' + str(t[1]) for t in query_data]) | |
response = requests.get(query_url, auth=my_auth, stream=True) | |
return response |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment