mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-01-19 00:40:42 -06:00
Add Twishort handler.
This commit is contained in:
parent
afae109348
commit
f02fae7fa2
@ -55,6 +55,12 @@ def compose_tweet(tweet, db, relative_times):
|
|||||||
for url in range(0, len(urls)):
|
for url in range(0, len(urls)):
|
||||||
try: text = text.replace(urls[url], tweet["entities"]["urls"][url]["expanded_url"])
|
try: text = text.replace(urls[url], tweet["entities"]["urls"][url]["expanded_url"])
|
||||||
except IndexError: pass
|
except IndexError: pass
|
||||||
|
if 'long_uri' in tweet:
|
||||||
|
try:
|
||||||
|
oldtext=text
|
||||||
|
text=twishort.get_full_text(tweet['long_uri'])
|
||||||
|
except:
|
||||||
|
text=oldtext
|
||||||
tweet["text"] = text
|
tweet["text"] = text
|
||||||
return [user+", ", tweet["text"], ts+", ", source]
|
return [user+", ", tweet["text"], ts+", ", source]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user