diff --git a/src/long_tweets/twishort.py b/src/long_tweets/twishort.py index d26dc394..ea147903 100644 --- a/src/long_tweets/twishort.py +++ b/src/long_tweets/twishort.py @@ -21,7 +21,10 @@ import keys from twitter import utils def get_twishort_uri(url): - return url.split("twishort.com/")[1] + try: + return url.split("twishort.com/")[1] + except IndexError: + return False def is_long(tweet): long = False