From 4568299f5ff470fd88dd2d3d8cd81c6b93df01e1 Mon Sep 17 00:00:00 2001 From: Andrei Date: Mon, 30 Oct 2017 02:16:13 +0300 Subject: [PATCH] =?UTF-8?q?UserAgent=20=D1=82=D0=B5=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D1=8C=20=D1=80=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=20=D1=81=20?= =?UTF-8?q?=D0=BA=D1=8D=D1=88=D0=B5=D0=BC.=20=D0=9C=D0=BE=D0=B4=D1=83?= =?UTF-8?q?=D0=BB=D1=8C=20=D0=BA=D0=BE=D0=BD=D0=BA=D1=82=D1=80=D0=BE=D0=BB?= =?UTF-8?q?=D1=8F=20=D1=81=D1=80=D0=B5=D0=B4=D1=81=D1=82=D0=B2=20=D0=B2?= =?UTF-8?q?=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89=D0=B0=D0=B5=D1=82=20JSON?= =?UTF-8?q?=20=D1=81=D0=B5=D1=80=D0=B2=D0=B5=D1=80=D0=B0=20=D0=B1=D0=B5?= =?UTF-8?q?=D0=B7=20=D0=BF=D1=80=D0=BE=D0=B2=D0=B5=D1=80=D0=BE=D0=BA.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- python3_anticaptcha/AntiCaptchaControl.py | 5 +---- python3_anticaptcha/config.py | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/python3_anticaptcha/AntiCaptchaControl.py b/python3_anticaptcha/AntiCaptchaControl.py index 40045e9..ec267ed 100644 --- a/python3_anticaptcha/AntiCaptchaControl.py +++ b/python3_anticaptcha/AntiCaptchaControl.py @@ -14,10 +14,7 @@ class AntiCaptchaControl: ''' answer = requests.post(get_balance_url, json = {'clientKey': self.ANTICAPTCHA_KEY}) - if answer.json()['errorId'] == 0: - return answer.json() - else: - return answer.json() + return answer.json() def complaint_on_result(self, reported_id): ''' diff --git a/python3_anticaptcha/config.py b/python3_anticaptcha/config.py index ba7a202..ff6fd4c 100644 --- a/python3_anticaptcha/config.py +++ b/python3_anticaptcha/config.py @@ -14,4 +14,4 @@ app_key = "1899" # получаем рандомный userAgent from fake_useragent import UserAgent -user_agent_data = UserAgent(cache=False).random +user_agent_data = UserAgent().random