morss: cache articles for 24hrs
Also make it possible to refetch articles, regardless of cache
This commit is contained in:
		@@ -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)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user