Created
January 21, 2016 11:08
-
-
Save onurmatik/0577123e3126cbb36f85 to your computer and use it in GitHub Desktop.
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
from twython import Twython, TwythonStreamer | |
tokens = [ | |
] | |
username = '' | |
rest_client = Twython(*tokens) | |
class Streamer(TwythonStreamer): | |
def on_success(self, data): | |
if 'text' in data: | |
rest_client.update_status( | |
status=u'hihihii... ' + data['text'].lower() | |
) | |
stream_client = Streamer(*tokens) | |
userid = rest_client.lookup_user(screen_name=username)[0]['id'] | |
stream_client.statuses.filter(follow=userid) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment