From a06d007ed2a7d36553082580ec020a418417d038 Mon Sep 17 00:00:00 2001 From: jwansek Date: Mon, 17 Dec 2018 16:42:40 +0000 Subject: removed a file --- archive_posts.py | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 archive_posts.py (limited to 'archive_posts.py') diff --git a/archive_posts.py b/archive_posts.py deleted file mode 100644 index ec6206b..0000000 --- a/archive_posts.py +++ /dev/null @@ -1,28 +0,0 @@ -import praw -import database - -reddit = praw.Reddit(client_id = "PyyyRXa3veWsWA", - client_secret = "hAMbhuzdHIew5hmn1CFwWb5FurM", - user_agent = "SmallYTChannelBot", - username = "SmallYTChannelBot", - password = "6NEWGNPBjJjbOjk3lbtm") - -subreddit = reddit.subreddit("SmallYTChannel") -db = database.Database() - -comment_stream = subreddit.stream.comments(pause_after=-1) -submission_stream = subreddit.stream.submissions(pause_after=-1) -while True: - for comment in comment_stream: - if comment is None: - break - if not db.id_in_blacklist(comment.id): - print("archived: ", comment.id) - db.add_to_blacklist(comment.id) - - for submission in submission_stream: - if submission is None: - break - if not db.id_in_blacklist(submission.id): - print("archived: ", submission.id) - db.add_to_blacklist(submission.id) -- cgit v1.2.3