fix #11
- use full retweeted text for native retweets instead of truncating it
This commit is contained in:
parent
e589bd6e21
commit
9b35809372
|
@ -72,6 +72,11 @@ def twitter(inp, api_key=None):
|
||||||
except IndexError:
|
except IndexError:
|
||||||
return 'error: not that many tweets found'
|
return 'error: not that many tweets found'
|
||||||
|
|
||||||
|
if 'retweeted_status' in tweet:
|
||||||
|
rt = tweet["retweeted_status"]
|
||||||
|
rt_text = http.unescape(rt["text"]).replace('\n', ' ')
|
||||||
|
text = "RT @%s %s" % (rt["user"]["screen_name"], rt_text)
|
||||||
|
else:
|
||||||
text = http.unescape(tweet["text"]).replace('\n', ' ')
|
text = http.unescape(tweet["text"]).replace('\n', ' ')
|
||||||
screen_name = tweet["user"]["screen_name"]
|
screen_name = tweet["user"]["screen_name"]
|
||||||
time = tweet["created_at"]
|
time = tweet["created_at"]
|
||||||
|
|
Loading…
Reference in New Issue