Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2017
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.67 KB | None | 0 0
  1. import praw
  2. import config
  3. import time
  4. import os
  5.  
  6. #sheet = client.open('Legislators 2017').sheet1
  7. #legislators = sheet.get_all_records()
  8. #print(legislators)
  9.  
  10.  
  11. def authenticate():
  12.     reddit = praw.Reddit(
  13.         username=config.username,
  14.         password=config.password,
  15.         client_id=config.client_id,
  16.         client_secret=config.client_secret,
  17.         user_agent="Congress Info Bot v0.1"
  18.     )
  19.     return reddit
  20.  
  21.  
  22. def run_bot():
  23.     reddit = authenticate()
  24.     for mention in reddit.inbox.mentions(limit=25):
  25.         comment.reply(
  26.             "Placeholder"    reddit = authenticate()
  27.             )
  28.  
  29.  
  30. if __name__ == '__main__':
  31.     run_bot(reddit)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement