Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bitly_api
- API_USER = "o_209qfgc29c"
- API_KEY = "R_2fbf5fa9c20e422bb279279869cbc351"
- b = bitly_api.Connection(API_USER, API_KEY)
- # Replace this with your Long URL Here
- longurl =input('longurl :')
- response = b.shorten(uri = longurl)
- # Now let us print the Bitly URL
- print(response)
- #testing
- if longurl==response.get("url"):
- print("Its not shorten")
- else :
- print("successfully convertor")
- print("shorten")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement