Advertisement
Guest User

Untitled

a guest
Feb 9th, 2018
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 2.22 KB | None | 0 0
  1. import praw
  2. import time
  3.  
  4.  
  5. def run():
  6.     print('Logging Into Reddit...')
  7.     # Create Bot with login and private key - username - password
  8.     bot = praw.Reddit(user_agent='AppNana Post Scheduler Bot v0.1', client_id='xyNB7BJhkza4hQ',
  9.                       client_secret='fNGdPVgk-WaPUqJvMEEKkauH8YY',
  10.                       username='Rosebstack', password='')
  11.     print('Logged in')
  12.  
  13.     sub_list1 = ['AppNana', 'APPNANAS', 'appnana_4_everybody', 'Appnanacodeexchange', 'AppNanaCodeHack', 'AppnanaMoney',
  14.                  'AppnanaInviteCodes']
  15.     while 1:
  16.         for sub in sub_list1:
  17.             title = "d25367499"
  18.             message = ''
  19.             bot.subreddit(sub).submit(title, message)  # Code for submitting new post on Reddit
  20.             time.sleep(600)
  21.  
  22.         time.sleep(3600)
  23.  
  24.     sub_list2 = ['AppNana']
  25.     while 1:
  26.         for sub in sub_list2:
  27.             title = "d25367499"
  28.             message = ''
  29.             bot.subreddit(sub).submit(title, message)  # Code for submitting new post on Reddit
  30.  
  31.         time.sleep(7200)
  32.  
  33.     sub_list3 = ['APPNANAS']
  34.     while 1:
  35.         for sub in sub_list3:
  36.             title = "d25367499"
  37.             message = ''
  38.             bot.subreddit(sub).submit(title, message)  # Code for submitting new post on Reddit
  39.  
  40.         time.sleep(7200)
  41.  
  42.     sub_list4 = ['appnana_4_everybody', 'Appnanacodeexchange']
  43.     while 1:
  44.         for sub in sub_list4:
  45.             title = "d25367499"
  46.             message = ''
  47.             bot.subreddit(sub).submit(title, message)  # Code for submitting new post on Reddit
  48.             time.sleep(600)
  49.  
  50.         time.sleep(6600)
  51.  
  52.     sub_list5 = ['AppNanaCodeHack', 'AppnanaMoney', 'AppnanaInviteCodes']
  53.     while 1:
  54.         for sub in sub_list5:
  55.             title = "d25367499"
  56.             message = ''
  57.             bot.subreddit(sub).submit(title, message)  # Code for submitting new post on Reddit
  58.             time.sleep(600)
  59.  
  60.         time.sleep(56400)
  61.  
  62.     sub_list = ['AppNana_Codes']
  63.     while 1:
  64.         for sub in sub_list:
  65.             title = "d25367499"
  66.             message = ''
  67.             bot.subreddit(sub).submit(title, message)  # Code for submitting new post on Reddit
  68.  
  69.  
  70. if __name__ == '__main__':
  71.     run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement