|
|
|
@ -2,7 +2,7 @@ import requests, json
|
|
|
|
|
from time import sleep
|
|
|
|
|
|
|
|
|
|
mod = 0
|
|
|
|
|
sr = '<subreddit>
|
|
|
|
|
sr = '<subreddit>'
|
|
|
|
|
headers = {'User-Agent': 'Wowbot/1.0.0'}
|
|
|
|
|
key = '<oauth key>'
|
|
|
|
|
secret = '<oauth secret>'
|
|
|
|
@ -58,6 +58,8 @@ def reddit_approve(id):
|
|
|
|
|
if (response.status_code == 401):
|
|
|
|
|
fix_token()
|
|
|
|
|
return reddit_reply(fullname, text)
|
|
|
|
|
elif (response.status_code == 403):
|
|
|
|
|
print("Your account has been shadowbanned")
|
|
|
|
|
elif (response.status_code == 200):
|
|
|
|
|
return response
|
|
|
|
|
|
|
|
|
@ -79,7 +81,6 @@ while True:
|
|
|
|
|
|
|
|
|
|
if (new == 1):
|
|
|
|
|
max = list[0]["id"]
|
|
|
|
|
print(max)
|
|
|
|
|
list = list[:last]
|
|
|
|
|
list.reverse()
|
|
|
|
|
|
|
|
|
@ -103,7 +104,7 @@ while True:
|
|
|
|
|
replyname = reply["json"]["data"]["things"][0]["data"]["name"]
|
|
|
|
|
|
|
|
|
|
if (mod == 1):
|
|
|
|
|
print(f"Approving {rpostname}, {replyname}\n")
|
|
|
|
|
print(f"Approving {rpostname}, {replyname}")
|
|
|
|
|
sleep(10)
|
|
|
|
|
resp = reddit_approve(rpostname)
|
|
|
|
|
reddit_approve(replyname)
|
|
|
|
@ -113,7 +114,7 @@ while True:
|
|
|
|
|
f.seek(0)
|
|
|
|
|
f.write(f'{id}\n')
|
|
|
|
|
if (id < max):
|
|
|
|
|
print("Waiting...\n")
|
|
|
|
|
print("Waiting...")
|
|
|
|
|
sleep(3)
|
|
|
|
|
f.close()
|
|
|
|
|
sleep(120)
|
|
|
|
|