Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- import sys
- import random
- import time
- bot=praw.Reddit(user_agent="random_upvote_bot")
- bot.login('randomupvotebot','iamabot')
- submissions=bot.get_subreddit(sys.argv[1]).get_new(limit=20)
- for submission in submissions:
- number=random.randint(0,5)
- if number==5:
- submission.upvote()
- #time.sleep(4200)
- #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!')
- print("Upvoted "+submission.title)
- #time.sleep(600)
Advertisement
Add Comment
Please, Sign In to add comment