Guest User

Untitled

a guest
May 7th, 2018
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #!/usr/bin/python
  2.  
  3. import plurkapi
  4. import random
  5. import sys
  6. import time
  7.  
  8. #
  9. # Create an API object.
  10. # Pass in your own username and password to the "login" method.
  11. #
  12.  
  13. username = 'littlebrain'
  14. password = '4ld1k3r3n'
  15.  
  16. plurk_api = plurkapi.PlurkAPI()
  17. if plurk_api.login(username, password) == False:
  18. print "Login failed!"
  19. sys.exit(1)
  20.  
  21. smileys = [':-))', ':-)', ':-D', '(LOL)', ':-P', '(woot)', ';-)', ':-o']
  22.  
  23. randomindex = random.randint(0,len(smileys))
  24. randomtime = random.randint(0,600)
  25.  
  26. #time.sleep(randomtime)
  27. #if randomindex == len(smileys):
  28. plurks = plurk_api.getUnreadPlurks()
  29. content = '(woot) %s unread responses! (woot)' % (len(plurks))
  30. #else:
  31. # content = smileys[randomindex]
  32.  
  33. plurk_api.addPlurk(lang='in', qualifier='is', content=content)
  34. print content
Add Comment
Please, Sign In to add comment