]> git.aero2k.de Git - urlbot-v3.git/commitdiff
fix broken searx engines, again
authorThorsten <mail@aero2k.de>
Fri, 5 Jul 2019 16:08:41 +0000 (18:08 +0200)
committerThorsten S <mail@aero2k.de>
Fri, 5 Jul 2019 16:10:18 +0000 (18:10 +0200)
distbot/plugins/searx.py

index 199c792d75c18336f714e241fd4bea5c08558857..802d0ba2841ceb953c890af12f2b29ae48600d59 100644 (file)
@@ -5,15 +5,13 @@ import logging
 import requests
 from lxml import html, etree
 from requests import HTTPError, ConnectionError
-from requests.exceptions import SSLError
+from requests.exceptions import SSLError, ContentDecodingError
 
 from distbot.bot.worker import Worker
 from distbot.common.action import Action
-from distbot.common.config import conf_get
 from distbot.common.message import get_words
 from distbot.common.utils import retry
 
-
 logger = logging.getLogger(__name__)
 
 
@@ -74,6 +72,9 @@ class Searx(Worker):
         except SSLError:
             self.search_list.pop(0)
             raise
+        except ContentDecodingError:
+            self.search_list.pop(0)
+            raise
 
         if response.status_code == 429:
             self.search_list.pop(0)