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
09e29c81
Commit
09e29c81
authored
Jun 18, 2014
by
Aaron Hill
Browse files
Unescape stream data from Twitter
parent
0097801b
Changes
1
Hide whitespace changes
Inline
Side-by-side
tweepy/streaming.py
View file @
09e29c81
...
...
@@ -7,6 +7,7 @@ import requests
from
requests.exceptions
import
Timeout
from
threading
import
Thread
from
time
import
sleep
from
HTMLParser
import
HTMLParser
import
ssl
from
tweepy.models
import
Status
...
...
@@ -39,7 +40,7 @@ class StreamListener(object):
Override this method if you wish to manually handle
the stream data. Return False to stop stream and close connection.
"""
data
=
json
.
loads
(
raw_data
)
data
=
json
.
loads
(
HTMLParser
().
unescape
(
raw_data
)
)
if
'in_reply_to_status_id'
in
data
:
status
=
Status
.
parse
(
self
.
api
,
data
)
...
...
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