Advertisement
Guest User

Untitled

a guest
Jul 24th, 2019
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. import bitly_api
  2.  
  3. API_USER = "o_209qfgc29c"
  4. API_KEY = "R_2fbf5fa9c20e422bb279279869cbc351"
  5.  
  6. b = bitly_api.Connection(API_USER, API_KEY)
  7.  
  8. # Replace this with your Long URL Here
  9. longurl =input('longurl :')
  10. response = b.shorten(uri = longurl)
  11.  
  12. # Now let us print the Bitly URL
  13. print(response)
  14.  
  15. #testing
  16. if longurl==response.get("url"):
  17. print("Its not shorten")
  18. else :
  19. print("successfully convertor")
  20. print("shorten")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement