Add "proxy" mode: does't make the feed full-text
Useful for feedify (twitter, facebook, etc) and for bad written rss feeds in not-strong-enough news readers (eg. TPB on tt-rss). Uses "persistent" in Cache() so as not to empty the cache because of that (cause Cache() drops items not asked for).
This commit is contained in:
		
							
								
								
									
										12
									
								
								morss.py
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								morss.py
									
									
									
									
									
								
							@@ -428,7 +428,7 @@ def Gather(url, cachePath, options):
 | 
				
			|||||||
	log(url)
 | 
						log(url)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	url = url.replace(' ', '%20')
 | 
						url = url.replace(' ', '%20')
 | 
				
			||||||
	cache = Cache(cachePath, url)
 | 
						cache = Cache(cachePath, url, options.proxy)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	log(cache._hash)
 | 
						log(cache._hash)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -510,11 +510,13 @@ def Gather(url, cachePath, options):
 | 
				
			|||||||
			item.remove()
 | 
								item.remove()
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		elif time.time() - startTime > MAX_TIME >= 0 or i+1 > MAX_ITEM > 0:
 | 
							elif time.time() - startTime > MAX_TIME >= 0 or i+1 > MAX_ITEM > 0:
 | 
				
			||||||
			if Fill(item, cache, url, True) is False:
 | 
								if not options.proxy:
 | 
				
			||||||
				item.remove()
 | 
									if Fill(item, cache, url, True) is False:
 | 
				
			||||||
				continue
 | 
										item.remove()
 | 
				
			||||||
 | 
										continue
 | 
				
			||||||
		else:
 | 
							else:
 | 
				
			||||||
			Fill(item, cache, url)
 | 
								if not options.proxy:
 | 
				
			||||||
 | 
									Fill(item, cache, url)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if item.desc and item.content:
 | 
							if item.desc and item.content:
 | 
				
			||||||
			if options.clip:
 | 
								if options.clip:
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user