From 88e7694de9d5423aace959d33b74eeb00afc5b03 Mon Sep 17 00:00:00 2001 From: pictuga Date: Sun, 10 Nov 2013 23:52:04 +0100 Subject: [PATCH] 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). --- morss.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/morss.py b/morss.py index 1ff70f8..431c10e 100644 --- a/morss.py +++ b/morss.py @@ -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,11 +510,13 @@ def Gather(url, cachePath, options): item.remove() continue elif time.time() - startTime > MAX_TIME >= 0 or i+1 > MAX_ITEM > 0: - if Fill(item, cache, url, True) is False: - item.remove() - continue + if not options.proxy: + if Fill(item, cache, url, True) is False: + item.remove() + continue else: - Fill(item, cache, url) + if not options.proxy: + Fill(item, cache, url) if item.desc and item.content: if options.clip: