From 0cdb7c79698adb8f6438a955bbc2c0644fd93002 Mon Sep 17 00:00:00 2001 From: Andrei Date: Thu, 2 May 2019 15:56:19 +0300 Subject: [PATCH] Add `requests` session close method. --- python3_anticaptcha/get_answer.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/python3_anticaptcha/get_answer.py b/python3_anticaptcha/get_answer.py index 9b128fb..7ff8719 100644 --- a/python3_anticaptcha/get_answer.py +++ b/python3_anticaptcha/get_answer.py @@ -23,9 +23,11 @@ def get_sync_result(result_payload: dict, sleep_time: int): time.sleep(sleep_time) else: captcha_response.update({"taskId": result_payload["taskId"]}) + session.close() return captcha_response else: captcha_response.update({"taskId": result_payload["taskId"]}) + session.close() return captcha_response