Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePhaseless committed Sep 13, 2024
1 parent 518cf1d commit d1bccc3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,14 @@ async def bypass_cloudflare(page: webdriver.Tab):
except asyncio.TimeoutError:
if page.target.title not in CHALLENGE_TITLES:
return challenged
raise

if elem is None:
logger.debug("Couldn't find the title, trying again")
logger.debug("Couldn't find the title, trying other method...")
continue

if not isinstance(elem, Element):
logger.fatal("Element is a string, please report this to Byparr dev")
raise InvalidElementError
elem = elem.parent
# Get the element containing the shadow root
for _ in range(3):
Expand Down

0 comments on commit d1bccc3

Please sign in to comment.