Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import praw
- import os
- import time
- import datetime
- from multiprocessing import Process
- USERNAME = [redacted]
- PASSWORD = [redacted]
- CLIENT_ID = [redacted]
- CLIENT_SECRET = [redacted]
- USER_AGENT = 'script:edit sidebar for /r/solidshibe:by /u/ioi_xd'
- print("Authenticating...")
- reddit = praw.Reddit(
- client_id=CLIENT_ID,
- client_secret=CLIENT_SECRET,
- password=PASSWORD,
- user_agent=USER_AGENT,
- username=USERNAME)
- print("Authenticaed as {}".format(reddit.user.me()))
- def sidebar(sub,n,time):
- sub = reddit.subreddit(sub)
- mod = sub.mod
- settings = mod.settings()
- sidebar_contents = settings['description']
- L = sidebar_contents.split('\n')
- num = int(L[n]) + 1
- L[n] = str(num)
- sub.mod.update(description='\n'.join(L))
- sleep(time)
- x = 1
- while True:
- sidebar(SolidShibe,n,86400)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement