-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathobtainauthors.py
28 lines (24 loc) · 1015 Bytes
/
obtainauthors.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import praw
from private.details import init
reddit = init()
allauthors = set()
for submission in reddit.subreddit("SubSimulatorGPT2").hot(limit=None):
allauthors.add(submission.author.name)
for submission in reddit.subreddit("SubSimulatorGPT2").controversial(limit=None):
allauthors.add(submission.author.name)
for submission in reddit.subreddit("SubSimulatorGPT2").new(limit=None):
allauthors.add(submission.author.name)
for submission in reddit.subreddit("SubSimulatorGPT2").rising(limit=None):
allauthors.add(submission.author.name)
for submission in reddit.subreddit("SubSimulatorGPT2").top(limit=None):
allauthors.add(submission.author.name)
for submission in reddit.subreddit("SubSimulatorGPT2").gilded(limit=None):
allauthors.add(submission.author.name)
allauthors = list(allauthors)
allauthors.sort()
print(len(allauthors),"Authors Found")
print(allauthors)
with open("newauthors.txt","w") as f:
for i in allauthors:
if "GPT2Bot" in i:
f.write(i + "\n")