mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-04-11 13:42:29 -04:00
Improving quoted retweets
This commit is contained in:
parent
5590ab47ee
commit
1ee629d731
@ -51,8 +51,10 @@ def compose_tweet(tweet, db, relative_times):
|
|||||||
user = tweet["user"]["name"]
|
user = tweet["user"]["name"]
|
||||||
source = re.sub(r"(?s)<.*?>", "", tweet["source"])
|
source = re.sub(r"(?s)<.*?>", "", tweet["source"])
|
||||||
if tweet.has_key("retweeted_status"):
|
if tweet.has_key("retweeted_status"):
|
||||||
if tweet.has_key("message") == False:
|
if tweet.has_key("message") == False or tweet["retweeted_status"]["is_quote_status"] == False:
|
||||||
text = "RT @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], StripChars(tweet["retweeted_status"]["text"]))
|
text = "RT @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], StripChars(tweet["retweeted_status"]["text"]))
|
||||||
|
elif tweet["retweeted_status"]["is_quote_status"]:
|
||||||
|
text = "%s" % (StripChars(tweet[value]))
|
||||||
else:
|
else:
|
||||||
text = "RT @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], StripChars(tweet[value]))
|
text = "RT @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], StripChars(tweet[value]))
|
||||||
if text[-1] in chars: text=text+"."
|
if text[-1] in chars: text=text+"."
|
||||||
|
Loading…
x
Reference in New Issue
Block a user