mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-22 19:28:09 -06:00
parent
6a3b498d52
commit
8928a64a12
@ -31,4 +31,8 @@ def clear_url(tweet):
|
|||||||
urls = utils.find_urls_in_text(tweet[value])
|
urls = utils.find_urls_in_text(tweet[value])
|
||||||
try: tweet["message"] = tweet["message"].replace(urls[-1], "")
|
try: tweet["message"] = tweet["message"].replace(urls[-1], "")
|
||||||
except IndexError: pass
|
except IndexError: pass
|
||||||
|
try:
|
||||||
|
tweet["entities"]["urls"].remove(tweet["entities"]["urls"][-1])
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
return tweet
|
return tweet
|
@ -123,6 +123,7 @@ def compose_quoted_tweet(quoted_tweet, original_tweet, show_screen_names=False):
|
|||||||
original_text = StripChars(original_tweet["text"])
|
original_text = StripChars(original_tweet["text"])
|
||||||
quoted_tweet["message"] = _(u"{0}. Quoted tweet from @{1}: {2}").format( quoted_tweet[value], original_user, original_text)
|
quoted_tweet["message"] = _(u"{0}. Quoted tweet from @{1}: {2}").format( quoted_tweet[value], original_user, original_text)
|
||||||
quoted_tweet = tweets.clear_url(quoted_tweet)
|
quoted_tweet = tweets.clear_url(quoted_tweet)
|
||||||
|
quoted_tweet["entities"]["urls"].extend(original_tweet["entities"]["urls"])
|
||||||
return quoted_tweet
|
return quoted_tweet
|
||||||
|
|
||||||
def compose_followers_list(tweet, db, relative_times=True, show_screen_names=False):
|
def compose_followers_list(tweet, db, relative_times=True, show_screen_names=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user