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__)
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)