From 6cf2f01b08273d2b164002fb5a38565bce2bcdfd Mon Sep 17 00:00:00 2001 From: Tanner Collin Date: Sat, 3 Oct 2020 23:41:57 +0000 Subject: [PATCH] Adjust feeds --- apiserver/feed.py | 2 +- apiserver/feeds/reddit.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/apiserver/feed.py b/apiserver/feed.py index 97d660a..d86e4a1 100644 --- a/apiserver/feed.py +++ b/apiserver/feed.py @@ -18,7 +18,7 @@ TWO_DAYS = 60*60*24*2 def list(): feed = [] - feed += [(x, 'hackernews') for x in hackernews.feed()[:10]] + feed += [(x, 'hackernews') for x in hackernews.feed()[:15]] feed += [(x, 'reddit') for x in reddit.feed()[:10]] feed += [(x, 'tildes') for x in tildes.feed()[:5]] return feed diff --git a/apiserver/feeds/reddit.py b/apiserver/feeds/reddit.py index 0ea1963..9b754cd 100644 --- a/apiserver/feeds/reddit.py +++ b/apiserver/feeds/reddit.py @@ -14,7 +14,7 @@ from prawcore.exceptions import PrawcoreException from utils import render_md, clean -SUBREDDITS = 'Economics+Foodforthought+TrueReddit+privacy' +SUBREDDITS = 'Economics+AcademicPhilosophy+DepthHub+Foodforthought+HistoryofIdeas+LaymanJournals+PhilosophyofScience+PoliticsPDFs+Scholar+StateOfTheUnion+TheAgora+TrueFilm+TrueReddit+UniversityofReddit+culturalstudies+hardscience+indepthsports+indepthstories+ludology+neurophilosophy+resilientcommunities+worldevents' SITE_LINK = lambda x : 'https://old.reddit.com{}'.format(x) SITE_AUTHOR_LINK = lambda x : 'https://old.reddit.com/u/{}'.format(x) @@ -67,6 +67,9 @@ 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: + return False + if r.selftext: s['text'] = render_md(clean(r.selftext))