Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Zahra Rajabi
tweepy
Commits
c7b9c9e7
Commit
c7b9c9e7
authored
Apr 16, 2012
by
Joshua Roesslein
Browse files
Encode parameters using percent-encoding for spaces.
parent
748c4e0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/streaming.py
View file @
c7b9c9e7
...
...
@@ -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
=
url
lib
.
urlencode
(
self
.
parameters
)
self
.
body
=
url
encode_noplus
(
self
.
parameters
)
self
.
parameters
[
'delimited'
]
=
'length'
self
.
_start
(
async
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment