From 09e29c815bd21514ec62df2cd8e8d176678bee40 Mon Sep 17 00:00:00 2001 From: Aaron Hill Date: Wed, 18 Jun 2014 12:35:12 -0400 Subject: [PATCH] Unescape stream data from Twitter --- tweepy/streaming.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tweepy/streaming.py b/tweepy/streaming.py index fc3e7c5..187b14d 100644 --- 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) -- 2.25.1