Fixed some things related to twishort's tweets

This commit is contained in:
2016-06-25 19:48:21 -05:00
parent 48232a6cf8
commit b1cf1c5590
5 changed files with 21 additions and 13 deletions

View File

@@ -50,7 +50,7 @@ def compose_tweet(tweet, db, relative_times):
elif tweet.has_key("user"):
user = tweet["user"]["name"]
source = re.sub(r"(?s)<.*?>", "", tweet["source"])
try: text = "rt @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], StripChars(tweet["retweeted_status"]["text"]))
try: text = "rt @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], StripChars(tweet[value]))
except KeyError: pass
#text = "%s" % (StripChars(tweet["text"]))
if text[-1] in chars: text=text+"."