From: Benjamin Rubin Date: Sun, 20 Jul 2014 00:12:24 +0000 (-0400) Subject: Grab full text for retweeted statuses X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=606def7ec2238dc677e67b329587bae89f5497ae;p=rainbowstream.git Grab full text for retweeted statuses --- diff --git a/rainbowstream/draw.py b/rainbowstream/draw.py index 66c2483..f23e4ca 100644 --- a/rainbowstream/draw.py +++ b/rainbowstream/draw.py @@ -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 = []