From 8677664297d63f6c0e2b0b84516b152a24d9bf9c Mon Sep 17 00:00:00 2001 From: Xewdy <95155966+Xewdy444@users.noreply.github.com> Date: Wed, 29 Nov 2023 16:02:08 -0600 Subject: [PATCH] Reverted change to from_frames() method --- playwright_recaptcha/recaptchav2/recaptcha_box.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/playwright_recaptcha/recaptchav2/recaptcha_box.py b/playwright_recaptcha/recaptchav2/recaptcha_box.py index 332936a..c3b18b6 100644 --- a/playwright_recaptcha/recaptchav2/recaptcha_box.py +++ b/playwright_recaptcha/recaptchav2/recaptcha_box.py @@ -344,7 +344,8 @@ def from_frames(cls, frames: Iterable[SyncFrame]) -> SyncRecaptchaBox: recaptcha_box = cls(anchor_frame, bframe_frame) if ( - not recaptcha_box.challenge_is_solved() + recaptcha_box.checkbox.is_visible() + and not recaptcha_box.checkbox.is_checked() or recaptcha_box.audio_challenge_button.is_visible() and recaptcha_box.audio_challenge_button.is_enabled() or recaptcha_box.image_challenge_button.is_visible() @@ -517,7 +518,8 @@ async def from_frames(cls, frames: Iterable[AsyncFrame]) -> AsyncRecaptchaBox: recaptcha_box = cls(anchor_frame, bframe_frame) if ( - not await recaptcha_box.challenge_is_solved() + await recaptcha_box.checkbox.is_visible() + and not await recaptcha_box.checkbox.is_checked() or await recaptcha_box.audio_challenge_button.is_visible() and await recaptcha_box.audio_challenge_button.is_enabled() or await recaptcha_box.image_challenge_button.is_visible()