Advertisement
Guest User

Untitled

a guest
Jul 5th, 2015
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/usr/bin/python
  2. ## Save this script as a .py file and run it once.
  3.  
  4. import praw, pickle
  5.  
  6. username=""
  7. password=""
  8. ## FILL THESE "" IN WITH YOUR BOTS CREDENTIALS
  9.  
  10. r=praw.Reddit(user_agent="linux, script on pythonanywhere.com, which likes /r/BlackCats users cats (by /u/ilikeyourblackcat)")
  11. r.login(username, password)
  12. subreddit = r.get_subreddit('ilikeyourblackcat')
  13.  
  14. done = []
  15. for submission in subreddit.get_new():
  16. done.append(submission.id)
  17.  
  18. with open('blackCatBot.db', 'w') as pickle_out:
  19. pickle.dump(done, pickle_out)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement