Guest User

Untitled

a guest
Jul 27th, 2013
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.52 KB | None | 0 0
  1. import praw
  2. import sys
  3. import random
  4. import time
  5. bot=praw.Reddit(user_agent="random_upvote_bot")
  6. bot.login('randomupvotebot','iamabot')
  7. submissions=bot.get_subreddit(sys.argv[1]).get_new(limit=20)
  8. for submission in submissions:
  9.     number=random.randint(0,5)
  10.     if number==5:
  11.         submission.upvote()
  12.         #time.sleep(4200)
  13.         #submission.add_comment('Hey! I am /u/randomupvotebot . I upvote comments based on a fair dice row! You won an upvote! Hope it helps you!')
  14.        
  15.         print("Upvoted "+submission.title)
  16.         #time.sleep(600)
Advertisement
Add Comment
Please, Sign In to add comment