Adjust score and comment thresholds

master
Tanner Collin 2 months ago
parent 6b16a768a7
commit ab92bd5441
  1. 4
      apiserver/feeds/hackernews.py
  2. 4
      apiserver/feeds/lobsters.py
  3. 2
      apiserver/feeds/tildes.py

@ -84,6 +84,10 @@ def story(ref):
s['comments'] = list(filter(bool, s['comments']))
s['num_comments'] = comment_count(s) - 1
if s['score'] < 25 and s['num_comments'] < 10:
logging.info('Score ({}) or num comments ({}) below threshold.'.format(s['score'], s['num_comments']))
return False
if 'text' in r and r['text']:
s['text'] = clean(r['text'] or '')

@ -103,6 +103,10 @@ def story(ref):
s['comments'] = iter_comments(r['comments'])
s['num_comments'] = r['comment_count']
if s['score'] < 15 and s['num_comments'] < 10:
logging.info('Score ({}) or num comments ({}) below threshold.'.format(s['score'], s['num_comments']))
return False
if 'description' in r and r['description']:
s['text'] = clean(r['description'] or '')

@ -120,7 +120,7 @@ def story(ref):
logging.info('Group ({}) not in whitelist.'.format(s['group']))
return False
if s['score'] < 15 and s['num_comments'] < 15:
if s['score'] < 15 and s['num_comments'] < 10:
logging.info('Score ({}) or num comments ({}) below threshold.'.format(s['score'], s['num_comments']))
return False

Loading…
Cancel
Save