forked from tanner/qotnews
change to 3 days
This commit is contained in:
parent
1f063f0dac
commit
006db2960c
|
@ -11,8 +11,11 @@ import settings
|
|||
from feeds import hackernews, reddit, tildes, substack, manual, news
|
||||
from scrapers import outline, declutter, local
|
||||
|
||||
ONE_HOUR = 60*60
|
||||
ONE_DAY = 24*ONE_HOUR
|
||||
|
||||
INVALID_DOMAINS = ['youtube.com', 'bloomberg.com', 'wsj.com']
|
||||
TWO_DAYS = 60*60*24*2
|
||||
MAX_AGE_IN_DAYS = 3*ONE_DAY
|
||||
|
||||
substacks = {}
|
||||
for key, value in settings.SUBSTACK.items():
|
||||
|
@ -118,7 +121,7 @@ def update_story(story, is_manual=False):
|
|||
logging.info('Story not ready yet')
|
||||
return False
|
||||
|
||||
if story['date'] and not is_manual and story['date'] + TWO_DAYS < time.time():
|
||||
if story['date'] and not is_manual and story['date'] + MAX_AGE_IN_DAYS < time.time():
|
||||
logging.info('Story too old, removing')
|
||||
return False
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user