2017-04-05 02:53:39 +02:00
|
|
|
|
|
|
|
import praw
|
|
|
|
|
|
|
|
outfile = open('users.html', 'w')
|
|
|
|
|
|
|
|
credentials = open('credentials', 'r')
|
|
|
|
client_id = credentials.readline().strip(' \t\n\r')
|
|
|
|
client_secret = credentials.readline().strip(' \t\n\r')
|
|
|
|
|
|
|
|
reddit = praw.Reddit(client_id=client_id, client_secret=client_secret, user_agent='atlas_bot')
|
|
|
|
|
|
|
|
users = set()
|
|
|
|
|
2017-04-06 00:12:45 +02:00
|
|
|
# Manual entries:
|
|
|
|
users.add("MoonShinez");
|
2017-04-06 11:44:50 +02:00
|
|
|
users.add("Shovel_Ship");
|
2017-04-08 03:27:51 +02:00
|
|
|
users.add("Zequez");
|
2017-04-06 00:12:45 +02:00
|
|
|
|
2022-04-01 23:56:25 +02:00
|
|
|
for submission in reddit.subreddit('placeAtlas2').new(limit=10000):
|
2017-04-18 03:24:50 +02:00
|
|
|
try:
|
|
|
|
users.add(submission.author.name)
|
|
|
|
except AttributeError:
|
|
|
|
print(submission.title)
|
2017-04-05 02:53:39 +02:00
|
|
|
|
|
|
|
users = list(users)
|
|
|
|
users = sorted(users, key=str.lower)
|
|
|
|
|
|
|
|
print(len(users))
|
|
|
|
|
|
|
|
for user in users:
|
2017-04-06 02:25:40 +02:00
|
|
|
outfile.write("\t\t\t\t\t<a href=\"https://reddit.com/user/"+user+"\" target=\"_blank\">"+user+"</a>\n")
|