pythontwittertwython

How to follow a public twitter list via twython stream?


So i was wondering if it is possible to limit the output of a twython stream only to what is published within the context of a specific public twitter list id.

Example: My List has x users. Stream return only tweets/data by users within that specific list.

class TStream(TwythonStreamer):
    def on_success(self, data):
       tweet = TwitTweet(data)
       tweet.__str__()    

stream = TStream(config)
stream.statuses.filter(follow='**SPECIFIC PUBLIC TWITTER LIST**')

Many thx :)


Solution

  • This is not possible as part of the API. You'd have to dissect the list itself to find the IDs of the members, and then open a stream that used the follow parameter to follow all of the members.