mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-31 05:10:45 -06:00
Fixed a few issues with long tweets
This commit is contained in:
parent
c1c001ad96
commit
f9d869e824
@ -19,7 +19,7 @@
|
||||
from twitter import utils
|
||||
|
||||
def is_long(tweet):
|
||||
if tweet.has_key("is_quote_status") and tweet["is_quote_status"] == True:
|
||||
if tweet.has_key("is_quote_status") and tweet["is_quote_status"] == True and tweet.has_key("quoted_status"):
|
||||
return tweet["quoted_status_id"]
|
||||
return False
|
||||
|
||||
|
@ -51,7 +51,7 @@ def compose_tweet(tweet, db, relative_times):
|
||||
user = tweet["user"]["name"]
|
||||
source = re.sub(r"(?s)<.*?>", "", tweet["source"])
|
||||
if tweet.has_key("retweeted_status"):
|
||||
if tweet.has_key("message") == False or tweet["retweeted_status"]["is_quote_status"] == False:
|
||||
if tweet.has_key("message") == False and tweet["retweeted_status"]["is_quote_status"] == False:
|
||||
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]))
|
||||
|
Loading…
x
Reference in New Issue
Block a user