Grab full text for retweeted statuses
authorBenjamin Rubin <bnrubin@gmail.com>
Sun, 20 Jul 2014 00:12:24 +0000 (20:12 -0400)
committerBenjamin Rubin <bnrubin@gmail.com>
Sun, 20 Jul 2014 00:12:24 +0000 (20:12 -0400)
rainbowstream/draw.py

index 66c2483b957e87f33c008e5e5b92457db14159be..f23e4cacd70d8ab9558573289590a924673e3a8e 100644 (file)
@@ -152,7 +152,7 @@ def draw(t, iot=False, keyword=None, check_semaphore=False, fil=[], ig=[]):
     check_theme()
     # Retrieve tweet
     tid = t['id']
-    text = unescape(t['text'])
+    text = t['text']
     screen_name = t['user']['screen_name']
     name = t['user']['name']
     created_at = t['created_at']
@@ -161,6 +161,15 @@ def draw(t, iot=False, keyword=None, check_semaphore=False, fil=[], ig=[]):
     date = date - datetime.timedelta(seconds=time.timezone)
     clock = date.strftime('%Y/%m/%d %H:%M:%S')
 
+    # Pull extended retweet text
+    try:
+        text = 'RT @{0}: {1}'.format(t['retweeted_status']['user']['screen_name'],
+                                     t['retweeted_status']['text'])
+    except:
+        pass
+
+    text = unescape(text)
+
     # Get expanded url
     try:
         expanded_url = []