View difference between Paste ID: mHiJwaLB and aPEvhKVG
SHOW: | | - or go back to the newest paste.
1
import praw
2
import time
3
from datetime import datetime
4
    
5
def time():
6
    current_time = datetime.now().strftime('%H:%M'
7
8
def run():
9
    print('Logging Into Reddit...')
10
    bot = praw.Reddit(user_agent='AppNana Scheduler', client_id='',
11
                      client_secret='',
12
                      username='', password='')
13
    print('Logged in')
14
15
    sub_list = ['AppNanas', 'Appnana_4_everybody', 'AppNanaCodeHack', 'AppnanaMoney', 'Appnanacodeexchange', 'AppnanaInviteCodes']
16
    while 1:
17
        for sub in sub_list:
18
            title = "d25367499"
19
            message = ''
20
            bot.subreddit(sub).submit(title, message)                   #Code for submitting new post on Reddit
21
            print('Posted to r/{sub} at {current_time}')
22
            time.sleep(2400)
23
24
if __name__ == '__main__':
25
    run()