From 0da95231fbe8ac19395ea16d2fa661b45829e7fb Mon Sep 17 00:00:00 2001 From: Sreenivas V Rao Date: Thu, 27 Dec 2018 09:47:22 +0530 Subject: [PATCH] Bug fix, remove credentials from log. --- bot.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/bot.py b/bot.py index 48ec5d0..b139bd2 100644 --- a/bot.py +++ b/bot.py @@ -11,7 +11,6 @@ def get_bot(): PRAW_PASSWORD = os.environ.get('PRAW_PASSWORD') PRAW_USERNAME = os.environ.get('PRAW_USERNAME') PRAW_USERAGENT = os.environ.get('PRAW_USERAGENT') - print PRAW_USERAGENT, PRAW_CLIENT_SECRET, PRAW_CLIENT_ID, PRAW_PASSWORD, PRAW_USERNAME return praw.Reddit( username=PRAW_USERNAME, password=PRAW_PASSWORD, @@ -55,7 +54,7 @@ def comment(cache): all_posts = subreddit.new(limit=100) for post in all_posts: if 'arxiv.org' in post.url: - if cache.get(post.id) is None: + if cache.get(post.id) and cache.get(post.id) is 'T': print "Parsed this post already: %s"%(post.url) continue for comment in post.comments: