mirror of
https://github.com/Watchful1/PushshiftDumps.git
synced 2025-07-22 22:30:49 -04:00
Move streamer files in
This commit is contained in:
parent
4f1d70d34a
commit
de209b338a
8 changed files with 1112 additions and 0 deletions
26
personal/opt_in_quarantined.py
Normal file
26
personal/opt_in_quarantined.py
Normal file
|
@ -0,0 +1,26 @@
|
|||
import asyncpraw
|
||||
import requests
|
||||
import asyncio
|
||||
|
||||
|
||||
async def opt_in(reddit, subreddit_name):
|
||||
subreddit = await reddit.subreddit(subreddit_name)
|
||||
await subreddit.quaran.opt_in()
|
||||
|
||||
|
||||
async def main(subreddits):
|
||||
reddit = asyncpraw.Reddit("Watchful12")
|
||||
for subreddit_name in subreddits:
|
||||
print(f"r/{subreddit_name}")
|
||||
try:
|
||||
subreddit = await reddit.subreddit(subreddit_name)
|
||||
await subreddit.quaran.opt_in()
|
||||
except Exception as err:
|
||||
print(f"Error opting into r/{subreddit_name} : {err}")
|
||||
await reddit.close()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
subreddits = requests.get("https://pastebin.com/raw/WKi36t1w").text.split("\r\n")
|
||||
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
|
||||
asyncio.run(main(subreddits))
|
Loading…
Add table
Add a link
Reference in a new issue