morss: cache articles for 24hrs

Also make it possible to refetch articles, regardless of cache
master
pictuga 2020-05-12 21:10:31 +02:00
parent 5dac4c69a1
commit 7d0d416610
1 changed files with 9 additions and 2 deletions

View File

@ -243,10 +243,17 @@ def ItemFill(item, options, feedurl='/', fast=False):
# download
delay = -1
if fast:
# super-fast mode
if fast or options.fast:
# force cache, don't fetch
delay = -2
elif options.force:
# force refresh
delay = 0
else:
delay = 24*60*60 # 24h
try:
req = crawler.adv_get(url=link, delay=delay, timeout=TIMEOUT)