Adjust feeds
This commit is contained in:
parent
607573dd44
commit
6cf2f01b08
|
@ -18,7 +18,7 @@ TWO_DAYS = 60*60*24*2
|
||||||
|
|
||||||
def list():
|
def list():
|
||||||
feed = []
|
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, 'reddit') for x in reddit.feed()[:10]]
|
||||||
feed += [(x, 'tildes') for x in tildes.feed()[:5]]
|
feed += [(x, 'tildes') for x in tildes.feed()[:5]]
|
||||||
return feed
|
return feed
|
||||||
|
|
|
@ -14,7 +14,7 @@ from prawcore.exceptions import PrawcoreException
|
||||||
|
|
||||||
from utils import render_md, clean
|
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_LINK = lambda x : 'https://old.reddit.com{}'.format(x)
|
||||||
SITE_AUTHOR_LINK = lambda x : 'https://old.reddit.com/u/{}'.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['comments'] = list(filter(bool, s['comments']))
|
||||||
s['num_comments'] = r.num_comments
|
s['num_comments'] = r.num_comments
|
||||||
|
|
||||||
|
if s['score'] < 25 and s['num_comments'] < 10:
|
||||||
|
return False
|
||||||
|
|
||||||
if r.selftext:
|
if r.selftext:
|
||||||
s['text'] = render_md(clean(r.selftext))
|
s['text'] = render_md(clean(r.selftext))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user