From c7b9c9e7a33a7512bf67b83df4044c55e8725663 Mon Sep 17 00:00:00 2001 From: Joshua Roesslein Date: Mon, 16 Apr 2012 15:58:10 -0500 Subject: [PATCH] Encode parameters using percent-encoding for spaces. --- tweepy/streaming.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index dd144aa..c86dc4c 100644 --- a/tweepy/streaming.py +++ b/tweepy/streaming.py @@ -6,13 +6,12 @@ import httplib from socket import timeout from threading import Thread from time import sleep -import urllib from tweepy.models import Status from tweepy.api import API from tweepy.error import TweepError -from tweepy.utils import import_simplejson +from tweepy.utils import import_simplejson, urlencode_noplus json = import_simplejson() STREAM_VERSION = 1 @@ -220,7 +219,7 @@ class Stream(object): self.parameters['locations'] = ','.join(['%.2f' % l for l in locations]) if count: self.parameters['count'] = count - self.body = urllib.urlencode(self.parameters) + self.body = urlencode_noplus(self.parameters) self.parameters['delimited'] = 'length' self._start(async) -- 2.25.1