Quantcast
Viewing latest article 2
Browse Latest Browse All 4

Answer by Amir for Using tweepy to stream users' timeline and filtered tweets

If you want to stream specific user time-line:

1) Find his/her ID with this website or google for How to find twitter ID.

2) Use following code:

    from tweepy import OAuthHandler    from tweepy import Stream    from tweepy import StreamListener    listener = StreamListener()    auth = OAuthHandler(config.API_KEY, config.API_SECRET)    auth.set_access_token(config.ACCESS_TOKEN, config.ACCESS_TOKEN_SECRET)    stream = Stream(auth, listener)    stream.filter(follow=['3511430425']) # user ID for random account

Viewing latest article 2
Browse Latest Browse All 4

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>