Advertisement
Guest User

Untitled

a guest
Mar 13th, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.44 KB | None | 0 0
  1. import praw
  2. import config
  3.  
  4. def bot_login():
  5.     print "Logging in..."
  6.     r = praw.Reddit(username = config.username,
  7.                 password = config.password,
  8.                 client_id = config.client_id,
  9.                 client_secret = config.client_secret,
  10.                 user_agent = "HND recruiting bot v1")
  11.     print "Logged in!"
  12.  
  13.     return r
  14.  
  15. def run_bot(r):
  16.     r.subreddit('overwatchlft').submit(config.postTitle, selftext= config.postText)
  17.     print "Posted!"
  18.  
  19. r = bot_login()
  20. run_bot(r)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement