projects
/
tweepy.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0097801
)
Unescape stream data from Twitter
author
Aaron Hill
<aa1ronham@gmail.com>
Wed, 18 Jun 2014 16:35:12 +0000
(12:35 -0400)
committer
Aaron Hill
<aa1ronham@gmail.com>
Wed, 18 Jun 2014 16:35:49 +0000
(12:35 -0400)
tweepy/streaming.py
patch
|
blob
|
blame
|
history
diff --git
a/tweepy/streaming.py
b/tweepy/streaming.py
index fc3e7c556c9725794ccf5731ccb8d89e7643f64c..187b14dc054a1c107288f84e3db7f7651194615b 100644
(file)
--- a/
tweepy/streaming.py
+++ b/
tweepy/streaming.py
@@
-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)