def process_seed_subreddits(reddit_obj): for subreddit in SEED_SUBREDDITS: if database.is_subreddit_processed(subreddit, DATABASE_NAME): print("Skipping seed subreddit: {}".format(subreddit)) else: print("Processing seed subreddit: {}".format(subreddit)) database.process_subreddit( subreddit, DATABASE_NAME, limit=LIMIT, reddit_obj=reddit_obj)
def process_next_subreddit(reddit_obj, count): next_subreddit = database.find_next_subreddit(DATABASE_NAME) if next_subreddit is None: print("Couldn't find next subreddit.") return 0 print("Processing subreddit #{}: {}".format(count + 1, next_subreddit)) database.process_subreddit( next_subreddit, DATABASE_NAME, limit=LIMIT, reddit_obj=reddit_obj) return 1