mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Don't try to load deleted tweets from twishort
This commit is contained in:
parent
20aaa39bc9
commit
8f4b1f9695
@ -66,6 +66,7 @@ class Session(object):
|
|||||||
try: i = self.check_quoted_status(i)
|
try: i = self.check_quoted_status(i)
|
||||||
except: pass
|
except: pass
|
||||||
i = self.check_long_tweet(i)
|
i = self.check_long_tweet(i)
|
||||||
|
if i == False: continue
|
||||||
if self.settings["general"]["reverse_timelines"] == False: self.db[name].append(i)
|
if self.settings["general"]["reverse_timelines"] == False: self.db[name].append(i)
|
||||||
else: self.db[name].insert(0, i)
|
else: self.db[name].insert(0, i)
|
||||||
num = num+1
|
num = num+1
|
||||||
@ -454,13 +455,11 @@ class Session(object):
|
|||||||
long = twishort.is_long(tweet)
|
long = twishort.is_long(tweet)
|
||||||
if long != False and config.app["app-settings"]["handle_longtweets"]:
|
if long != False and config.app["app-settings"]["handle_longtweets"]:
|
||||||
tweet["message"] = twishort.get_full_text(long)
|
tweet["message"] = twishort.get_full_text(long)
|
||||||
|
if tweet["message"] == False: return False
|
||||||
tweet["twishort"] = True
|
tweet["twishort"] = True
|
||||||
try:
|
for i in tweet["entities"]["user_mentions"]:
|
||||||
for i in tweet["entities"]["user_mentions"]:
|
if "@%s" % (i["screen_name"] not in tweet["message"]) and i["screen_name"] != tweet["user"]["screen_name"]:
|
||||||
if "@%s" % (i["screen_name"] not in tweet["message"]) and i["screen_name"] != tweet["user"]["screen_name"]:
|
if tweet.has_key("retweeted_status") and tweet["retweeted_status"]["user"]["screen_name"] == i["screen_name"]:
|
||||||
if tweet.has_key("retweeted_status") and tweet["retweeted_status"]["user"]["screen_name"] == i["screen_name"]:
|
continue
|
||||||
continue
|
tweet["message"] = u"@%s %s" % (i["screen_name"], tweet["message"])
|
||||||
tweet["message"] = u"@%s %s" % (i["screen_name"], tweet["message"])
|
|
||||||
except TypeError:
|
|
||||||
pass
|
|
||||||
return tweet
|
return tweet
|
Loading…
Reference in New Issue
Block a user