diff --git a/lib/urlwatch/jobs.py b/lib/urlwatch/jobs.py index d89f41f1..003c8b82 100644 --- a/lib/urlwatch/jobs.py +++ b/lib/urlwatch/jobs.py @@ -263,7 +263,7 @@ class UrlJob(Job): __required__ = ('url',) __optional__ = ('cookies', 'data', 'method', 'ssl_no_verify', 'ignore_cached', 'http_proxy', 'https_proxy', 'headers', 'ignore_connection_errors', 'ignore_http_error_codes', 'encoding', 'timeout', - 'ignore_timeout_errors', 'ignore_too_many_redirects') + 'ignore_timeout_errors', 'ignore_too_many_redirects', 'ignore_incomplete_reads') CHARSET_RE = re.compile('text/(html|plain); charset=([^;]*)') @@ -391,6 +391,8 @@ def ignore_error(self, exception): return True if isinstance(exception, requests.exceptions.TooManyRedirects) and self.ignore_too_many_redirects: return True + if isinstance(exception, requests.exceptions.ChunkedEncodingError) and self.ignore_incomplete_reads: + return True elif isinstance(exception, requests.exceptions.HTTPError): status_code = exception.response.status_code ignored_codes = []