From 7caace6b690f707d6260fe98196fdce3020b3c96 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Sat, 16 May 2020 19:26:15 +0200 Subject: [PATCH] Fix crash on rechaptcha exceptions --- pynyaata/connectors/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pynyaata/connectors/core.py b/pynyaata/connectors/core.py index a874a62..377c886 100644 --- a/pynyaata/connectors/core.py +++ b/pynyaata/connectors/core.py @@ -5,7 +5,7 @@ from enum import Enum from functools import wraps from logging import getLogger -from cloudscraper.exceptions import CloudflareException +from cloudscraper.exceptions import CloudflareException, reCaptchaException from requests import RequestException from .cloudscraper import CloudScraperWrapper @@ -91,7 +91,7 @@ def curl_content(url, params=None, ajax=False): output = response.text http_code = response.status_code - except (RequestException, CloudflareException) as e: + except (RequestException, CloudflareException, reCaptchaException) as e: output = '' http_code = 500 if IS_DEBUG: