Skip to content

Commit

Permalink
Cloudflare Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sarperavci committed Jul 6, 2024
1 parent 28850c5 commit e592b98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions CloudflareBypasser.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ def __init__(self, driver: ChromiumPage):
def clickCycle(self):
#reach the captcha button and click it
# if iframe does not exist, it means the page is already bypassed.
if self.driver.wait.ele_displayed('xpath://div/iframe',timeout=1.5):
if self.driver.wait.ele_displayed('#turnstile-wrapper',timeout=1.5):
time.sleep(1.5)
self.driver('xpath://div/iframe').ele("Verify you are human", timeout=2.5).click()
self.driver.ele("#turnstile-wrapper", timeout=2.5).click()
# The location of the button may vary time to time. I sometimes check the button's location and update the code.

def isBypassed(self):
title = self.driver.title.lower()
# If the title does not contain "just a moment", it means the page is bypassed.
Expand Down

0 comments on commit e592b98

Please sign in to comment.