Make :theforce also bypass http errors

master
pictuga 2015-02-21 01:58:16 +08:00
parent f0dcb9912e
commit d5269964fc
2 changed files with 2 additions and 2 deletions

View File

@ -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 - `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 - `debug`: to have some feedback from the script execution. Useful for debugging
- `mono`: disable multithreading while fetching, makes debugging easier - `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) - `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) - `smart`: try to show only new elements in feed, to make it lighter (based on 304 headers)
- http server only - http server only

View File

@ -353,7 +353,7 @@ def Fill(item, cache, options, feedurl='/', fast=False):
content = cache.get(link) content = cache.get(link)
match = re.search(r'^error-([a-z]{2,10})$', content) match = re.search(r'^error-([a-z]{2,10})$', content)
if match: if match:
if cache.age(link) < DELAY: if cache.age(link) < DELAY and not options.theforce:
log('cached error: %s' % match.groups()[0]) log('cached error: %s' % match.groups()[0])
return True return True
else: else: