mirror of
https://github.com/MCV-Software/TWBlue.git
synced 2025-07-18 06:06:06 -04:00
Added full Twishort support
This commit is contained in:
@@ -35,4 +35,12 @@ def get_full_text(uri):
|
||||
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"]
|
||||
# except:
|
||||
# return False
|
||||
# return False
|
||||
|
||||
def create_tweet(user_token, user_secret, text, media=0):
|
||||
data = {"user_token": user_token,
|
||||
"user_secret": user_secret,
|
||||
"text": text.encode("utf-8"),
|
||||
"media": media}
|
||||
response = requests.post("http://twblue.es/twishort.php", data=data)
|
||||
return response.json()["text_to_tweet"]
|
Reference in New Issue
Block a user