aboutsummaryrefslogtreecommitdiffstats
path: root/archive_posts.py
diff options
context:
space:
mode:
authorjwansek <eddie.atten.ea29@gmail.com>2018-12-17 16:50:20 +0000
committerjwansek <eddie.atten.ea29@gmail.com>2018-12-17 16:50:20 +0000
commit20dce4c47a4d0d71571ddf0e51a7d09a34ef60b8 (patch)
tree4142d029f9eea5f47b6e2d095416ec34466b6e76 /archive_posts.py
parentaae7b7bbe9433624507ed926265c70440be9a9ac (diff)
parent79891e47e1c789f0136a6d7e721ccd23bd33b0b6 (diff)
downloadSmallYTChannelBot-20dce4c47a4d0d71571ddf0e51a7d09a34ef60b8.tar.gz
SmallYTChannelBot-20dce4c47a4d0d71571ddf0e51a7d09a34ef60b8.zip
updated database
Diffstat (limited to 'archive_posts.py')
-rw-r--r--archive_posts.py28
1 files changed, 0 insertions, 28 deletions
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)