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).
master
pictuga 2013-11-10 23:52:04 +01:00
parent 66197a4f0e
commit 88e7694de9
1 changed files with 7 additions and 5 deletions

View File

@ -428,7 +428,7 @@ def Gather(url, cachePath, options):
log(url)
url = url.replace(' ', '%20')
cache = Cache(cachePath, url)
cache = Cache(cachePath, url, options.proxy)
log(cache._hash)
@ -510,10 +510,12 @@ def Gather(url, cachePath, options):
item.remove()
continue
elif time.time() - startTime > MAX_TIME >= 0 or i+1 > MAX_ITEM > 0:
if not options.proxy:
if Fill(item, cache, url, True) is False:
item.remove()
continue
else:
if not options.proxy:
Fill(item, cache, url)
if item.desc and item.content: