Skip to content

Commit

Permalink
Reverted change to from_frames() method
Browse files Browse the repository at this point in the history
  • Loading branch information
Xewdy444 committed Nov 29, 2023
1 parent 9f3590b commit 8677664
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions playwright_recaptcha/recaptchav2/recaptcha_box.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 8677664

Please sign in to comment.