From: Joshua Roesslein Date: Mon, 16 Apr 2012 20:58:10 +0000 (-0500) Subject: Encode parameters using percent-encoding for spaces. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=c7b9c9e7a33a7512bf67b83df4044c55e8725663;p=tweepy.git Encode parameters using percent-encoding for spaces. --- 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)