Fix crash on rechaptcha exceptions
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
d6ac52f08d
commit
7caace6b69
@ -5,7 +5,7 @@ from enum import Enum
|
|||||||
from functools import wraps
|
from functools import wraps
|
||||||
from logging import getLogger
|
from logging import getLogger
|
||||||
|
|
||||||
from cloudscraper.exceptions import CloudflareException
|
from cloudscraper.exceptions import CloudflareException, reCaptchaException
|
||||||
from requests import RequestException
|
from requests import RequestException
|
||||||
|
|
||||||
from .cloudscraper import CloudScraperWrapper
|
from .cloudscraper import CloudScraperWrapper
|
||||||
@ -91,7 +91,7 @@ def curl_content(url, params=None, ajax=False):
|
|||||||
|
|
||||||
output = response.text
|
output = response.text
|
||||||
http_code = response.status_code
|
http_code = response.status_code
|
||||||
except (RequestException, CloudflareException) as e:
|
except (RequestException, CloudflareException, reCaptchaException) as e:
|
||||||
output = ''
|
output = ''
|
||||||
http_code = 500
|
http_code = 500
|
||||||
if IS_DEBUG:
|
if IS_DEBUG:
|
||||||
|
Reference in New Issue
Block a user