From bc851d6d6fc8f0dd1c61b2fc57c08937c46fb529 Mon Sep 17 00:00:00 2001 From: Christian Heller Date: Mon, 18 Apr 2016 22:55:03 +0200 Subject: [PATCH] Fix page reading timeouts. --- plomlombot.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plomlombot.py b/plomlombot.py index aa7061c..ede4dca 100755 --- a/plomlombot.py +++ b/plomlombot.py @@ -339,7 +339,7 @@ def handle_url(url, notice, show_url=False): return True try: - r = requests.get(url, timeout=5, stream=True) + r = requests.get(url, timeout=15, stream=True) r.raw.decode_content = True text = r.raw.read(10000000+1) if len(text) > 10000000: @@ -347,6 +347,7 @@ def handle_url(url, notice, show_url=False): except (requests.exceptions.TooManyRedirects, requests.exceptions.ConnectionError, requests.exceptions.InvalidURL, + requests.exceptions.ReadTimeout, UnicodeError, ValueError, requests.exceptions.InvalidSchema) as error: -- 2.30.2