Added source in view tweet dialogue. @masonasons

This commit is contained in:
2016-01-09 00:45:52 -06:00
parent b8cfd60c9e
commit 56b64e5c6d
2 changed files with 10 additions and 2 deletions

View File

@@ -1,4 +1,5 @@
# -*- coding: utf-8 -*-
import re
import platform
system = platform.system()
import widgetUtils
@@ -173,13 +174,14 @@ class viewTweet(basicTweet):
text = text + "@%s: %s\n" % (tweetList[i]["user"]["screen_name"], tweetList[i]["text"])
rt_count = str(tweet["retweet_count"])
favs_count = str(tweet["favorite_count"])
source = str(re.sub(r"(?s)<.*?>", "", tweet["source"]))
if text == "":
if tweet.has_key("retweeted_status"):
text = "rt @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], tweet["retweeted_status"]["text"])
else:
text = tweet["text"]
text = self.clear_text(text)
self.message = message.viewTweet(text, rt_count, favs_count)
self.message = message.viewTweet(text, rt_count, favs_count,source)
self.message.set_title(len(text))
else:
text = tweet