Skip to content

Commit

Permalink
Update gee_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreiDrang committed Dec 13, 2023
1 parent c207d75 commit f8a45ce
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/python_rucaptcha/gee_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,7 @@ def captcha_handler(self, challenge: str, **kwargs) -> dict:
Notes:
Check class docstirng for more info
"""
if self.method == GeetestEnm.GeeTestTaskProxyless.value:
if challenge is not None:
self.create_task_payload["task"].update({"challenge": challenge})
else:
raise ValueError(f"For {self.method} challenge is required")
self.create_task_payload["task"].update({"challenge": challenge})

return self._processing_response(**kwargs)

Expand All @@ -215,10 +211,6 @@ async def aio_captcha_handler(self, challenge: str) -> dict:
Notes:
Check class docstirng for more info
"""
if self.method == GeetestEnm.GeeTestTaskProxyless.value:
if challenge is not None:
self.create_task_payload["task"].update({"challenge": challenge})
else:
raise ValueError(f"For {self.method} challenge is required")
self.create_task_payload["task"].update({"challenge": challenge})

return await self._aio_processing_response()

0 comments on commit f8a45ce

Please sign in to comment.