mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2024-11-26 12:53:12 -06:00
Return false in twishort module if a long tweet has been deleted
This commit is contained in:
parent
2dd262cc83
commit
bd2460e42b
@ -35,11 +35,11 @@ def is_long(tweet):
|
|||||||
return long
|
return long
|
||||||
|
|
||||||
def get_full_text(uri):
|
def get_full_text(uri):
|
||||||
# try:
|
try:
|
||||||
r = requests.get("http://api.twishort.com/1.1/get.json", params={"uri": uri, "api_key": keys.keyring.get("twishort_api_key")})
|
r = requests.get("http://api.twishort.com/1.1/get.json", params={"uri": uri, "api_key": keys.keyring.get("twishort_api_key")})
|
||||||
return r.json()["text"]
|
return r.json()["text"]
|
||||||
# except:
|
except:
|
||||||
# return False
|
return False
|
||||||
|
|
||||||
def create_tweet(user_token, user_secret, text, media=0):
|
def create_tweet(user_token, user_secret, text, media=0):
|
||||||
twitter = OAuth1Session(keys.keyring.get("api_key"), client_secret=keys.keyring.get("api_secret"), resource_owner_key=user_token, resource_owner_secret=user_secret)
|
twitter = OAuth1Session(keys.keyring.get("api_key"), client_secret=keys.keyring.get("api_secret"), resource_owner_key=user_token, resource_owner_secret=user_secret)
|
||||||
|
Loading…
Reference in New Issue
Block a user