From: fitnr Date: Tue, 3 Jan 2017 02:04:31 +0000 (-0500) Subject: Allow int or str IDs as streaming arguments X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8c4a36d64fa75e69d474ee0c8a41767e5655663f;p=tweepy.git Allow int or str IDs as streaming arguments --- 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, "