Guest User

fluffiest dorito ever

a guest
Apr 16th, 2015
215
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 1.54 KB | None | 0 0
  1.  
  2.  
  3. import time
  4.  
  5. from time import ctime
  6.  
  7. import praw
  8.  
  9. r = praw.Reddit('/r/cryptospread auto dogecoin tipper by u/PacnetNetty v 1.0.')
  10. r.login("autodogetipper", "myguy22u")
  11.  
  12. balance = 2000
  13.  
  14. while True:
  15.     print('Checking subbredit again')
  16.     subreddit = r.get_subreddit('cryptospread')
  17.     for submission in subreddit.get_new(limit=10):
  18.         alreadytipped = False      
  19.         if balance >= 100:
  20.             flat_comments = praw.helpers.flatten_tree(submission.comments)
  21.             for comment in flat_comments:
  22.                 print('Iterating through comment (author: ' + comment.author.name + ')')
  23.                 if comment.author.name == "autodogetipper":
  24.                     print('already tipped')
  25.                     alreadytipped = True
  26.                     time.sleep(5)
  27.             if not alreadytipped:                
  28.                 commentS = "You get 100 doge for free for posting in /r/cryptospread! +/u/dogetipbot 100 doge ........ \nOwner: /u/PacnetNetty | [info](http://www.reddit.com/r/cryptospread/comments/31jrr0/bot_autodogetipper_bot_is_now_active/) | Tip me to add to my pool!"
  29.                
  30.                 submission.add_comment(commentS)
  31.                
  32.                 balance = balance - 100
  33.                 print('[' + ctime() + '] Tipped ' + submission.id + ', waiting 11 more minutes (alreadytipped- ' + str(alreadytipped) + ')')
  34.                 time.sleep(660)
  35.         else:
  36.             r.send_message('PacnetNetty', 'Out of DOGE', 'Im out of doge, please refill me')
  37.             print('OUT OF DOGE')
Add Comment
Please, Sign In to add comment