mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-23 03:38:08 -06:00
Remove unneeded code
This commit is contained in:
parent
3a465f2314
commit
68ea029fe3
@ -44,7 +44,7 @@ def compose_tweet(tweet, db, relative_times, show_screen_names=False):
|
|||||||
value = "full_text"
|
value = "full_text"
|
||||||
else:
|
else:
|
||||||
value = "text"
|
value = "text"
|
||||||
if tweet.has_key("retweeted_status") and value == "full_text":
|
if tweet.has_key("retweeted_status") and value != "message":
|
||||||
text = StripChars(tweet["retweeted_status"][value])
|
text = StripChars(tweet["retweeted_status"][value])
|
||||||
else:
|
else:
|
||||||
text = StripChars(tweet[value])
|
text = StripChars(tweet[value])
|
||||||
@ -55,12 +55,11 @@ def compose_tweet(tweet, db, relative_times, show_screen_names=False):
|
|||||||
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 and 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"][value]))
|
text = "RT @%s: %s" % (tweet["retweeted_status"]["user"]["screen_name"], text)
|
||||||
elif tweet["retweeted_status"]["is_quote_status"]:
|
elif tweet["retweeted_status"]["is_quote_status"]:
|
||||||
text = "%s" % (StripChars(tweet[value]))
|
text = "%s" % (text)
|
||||||
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"], text)
|
||||||
# if text[-1] in chars: text=text+"."
|
|
||||||
if tweet.has_key("message") == False:
|
if tweet.has_key("message") == False:
|
||||||
urls = utils.find_urls_in_text(text)
|
urls = utils.find_urls_in_text(text)
|
||||||
for url in range(0, len(urls)):
|
for url in range(0, len(urls)):
|
||||||
|
Loading…
Reference in New Issue
Block a user