morss: cache articles for 24hrs
Also make it possible to refetch articles, regardless of cachemaster
parent
5dac4c69a1
commit
7d0d416610
|
@ -243,10 +243,17 @@ def ItemFill(item, options, feedurl='/', fast=False):
|
||||||
# download
|
# download
|
||||||
delay = -1
|
delay = -1
|
||||||
|
|
||||||
if fast:
|
if fast or options.fast:
|
||||||
# super-fast mode
|
# force cache, don't fetch
|
||||||
delay = -2
|
delay = -2
|
||||||
|
|
||||||
|
elif options.force:
|
||||||
|
# force refresh
|
||||||
|
delay = 0
|
||||||
|
|
||||||
|
else:
|
||||||
|
delay = 24*60*60 # 24h
|
||||||
|
|
||||||
try:
|
try:
|
||||||
req = crawler.adv_get(url=link, delay=delay, timeout=TIMEOUT)
|
req = crawler.adv_get(url=link, delay=delay, timeout=TIMEOUT)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue