Created
May 28, 2013 18:00
-
-
Save michaelhelmick/5664714 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
import requests | |
from requests_oauthlib import OAuth1 | |
import json | |
auth = OAuth1(APP_KEY, APP_SECRET, OAUTH_TOKEN, OAUTH_TOKEN_SECRET) | |
client = requests.Session() | |
client.auth = auth | |
client.stream = True | |
response = client.post('https://stream.twitter.com/1.1/statuses/filter.json', data={'track': '@mikehelmick'}) | |
for line in response.iter_lines(): | |
if line: | |
print json.loads(line) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment