From 10699893ea2994545ab7befc89f43e5af9790d44 Mon Sep 17 00:00:00 2001 From: Ethan Dalool Date: Tue, 12 May 2020 18:19:46 -0700 Subject: [PATCH] Allow get_comments to create the database. This was false because prior to Pushshift, commentaugment worked by reading the comments tree on every submission, and thus couldn't be done first. Now, I think there's nothing wrong with getting comments before submissions. --- timesearch_modules/get_comments.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/timesearch_modules/get_comments.py b/timesearch_modules/get_comments.py index 6be4b84..91c8c71 100644 --- a/timesearch_modules/get_comments.py +++ b/timesearch_modules/get_comments.py @@ -28,10 +28,10 @@ def get_comments( database.insert(specific_submission) elif subreddit: - (database, subreddit) = tsdb.TSDB.for_subreddit(subreddit, do_create=False, fix_name=True) + (database, subreddit) = tsdb.TSDB.for_subreddit(subreddit, do_create=True, fix_name=True) else: - (database, username) = tsdb.TSDB.for_user(username, do_create=False, fix_name=True) + (database, username) = tsdb.TSDB.for_user(username, do_create=True, fix_name=True) cur = database.sql.cursor()