From 8c4a36d64fa75e69d474ee0c8a41767e5655663f Mon Sep 17 00:00:00 2001 From: fitnr Date: Mon, 2 Jan 2017 21:04:31 -0500 Subject: [PATCH] Allow int or str IDs as streaming arguments --- tweepy/streaming.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index e272fb8..c98fab9 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -430,10 +430,13 @@ class Stream(object): if self.running: raise TweepError('Stream object already connected!') self.url = '/%s/statuses/filter.json' % STREAM_VERSION + if follow: - self.body['follow'] = u','.join(follow).encode(encoding) + self.body['follow'] = u','.join(str(f) for f in follow).encode(encoding) + if track: - self.body['track'] = u','.join(track).encode(encoding) + self.body['track'] = u','.join(str(f) for f in track).encode(encoding) + if locations and len(locations) > 0: if len(locations) % 4 != 0: raise TweepError("Wrong number of locations points, " -- 2.25.1