SHARE
TWEET

Untitled

a guest Jul 24th, 2019 81 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top