Advertisement
Guest User

sub to smut

a guest
Jun 26th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import praw
  2. import re
  3.  
  4. r = praw.Reddit(client_id='CLIENT_ID',
  5. client_secret='CLIENT_SECRET',
  6. user_agent='USER_AGENT',
  7. username='USERNAME',
  8. password='PASSWORD')
  9.  
  10. with open(r'list_of_smut.txt') as f:
  11. for line in f:
  12. for sub in line.split(', '):
  13. try:
  14. r.subreddit(sub).subscribe()
  15. except:
  16. print('failed to subscribe to ', sub)
  17.  
  18. print('done')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement