forked from tanner/qotnews
move reddit thresholds as settings variables.
This commit is contained in:
parent
7420b5ece9
commit
b23e470317
|
@ -73,7 +73,7 @@ def story(ref):
|
|||
s['comments'] = list(filter(bool, s['comments']))
|
||||
s['num_comments'] = r.num_comments
|
||||
|
||||
if s['score'] < 25 and s['num_comments'] < 10:
|
||||
if s['score'] < settings.REDDIT_SCORE_THRESHOLD and s['num_comments'] < settings.REDDIT_COMMENT_THRESHOLD:
|
||||
return False
|
||||
|
||||
if r.selftext:
|
||||
|
|
|
@ -31,6 +31,10 @@ REDDIT_CLIENT_ID = ''
|
|||
REDDIT_CLIENT_SECRET = ''
|
||||
REDDIT_USER_AGENT = ''
|
||||
|
||||
# Minimum points or number of comments before including a thread:
|
||||
REDDIT_COMMENT_THRESHOLD = 10
|
||||
REDDIT_SCORE_THRESHOLD = 25
|
||||
|
||||
SUBREDDITS = [
|
||||
'Economics',
|
||||
'AcademicPhilosophy',
|
||||
|
|
Loading…
Reference in New Issue
Block a user