From: Christian Heller Date: Mon, 18 Apr 2016 20:55:03 +0000 (+0200) Subject: Fix page reading timeouts. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7Bdb.prefix%7D%7D/reset_cookie?a=commitdiff_plain;h=bc851d6d6fc8f0dd1c61b2fc57c08937c46fb529;p=plomlombot-irc.git Fix page reading timeouts. --- 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: