From d5269964fc1cb4af1fd6d7f8767e396d5ab7767b Mon Sep 17 00:00:00 2001 From: pictuga Date: Sat, 21 Feb 2015 01:58:16 +0800 Subject: [PATCH] Make :theforce also bypass http errors --- README.md | 2 +- morss/morss.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 49e8e05..2192e29 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ The arguments are: - `cache`: only take articles from the cache (ie. don't grab new articles' content), so as to save time - `debug`: to have some feedback from the script execution. Useful for debugging - `mono`: disable multithreading while fetching, makes debugging easier - - `theforce`: force download the rss feed + - `theforce`: force download the rss feed and ignore cached http errros - `silent`: don't output the final RSS (useless on its own, but can be nice when debugging) - `smart`: try to show only new elements in feed, to make it lighter (based on 304 headers) - http server only diff --git a/morss/morss.py b/morss/morss.py index 9abd683..0e2a16d 100644 --- a/morss/morss.py +++ b/morss/morss.py @@ -353,7 +353,7 @@ def Fill(item, cache, options, feedurl='/', fast=False): content = cache.get(link) match = re.search(r'^error-([a-z]{2,10})$', content) if match: - if cache.age(link) < DELAY: + if cache.age(link) < DELAY and not options.theforce: log('cached error: %s' % match.groups()[0]) return True else: