home · contact · privacy
Fix page reading timeouts.
authorChristian Heller <c.heller@plomlompom.de>
Mon, 18 Apr 2016 20:55:03 +0000 (22:55 +0200)
committerChristian Heller <c.heller@plomlompom.de>
Mon, 18 Apr 2016 20:55:03 +0000 (22:55 +0200)
plomlombot.py

index aa7061c..ede4dca 100755 (executable)
@@ -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: