This commit is contained in:
Thephaseless 2024-09-13 19:00:20 +00:00
parent 518cf1de42
commit d1bccc3e4c

View File

@ -74,12 +74,14 @@ async def bypass_cloudflare(page: webdriver.Tab):
except asyncio.TimeoutError: except asyncio.TimeoutError:
if page.target.title not in CHALLENGE_TITLES: if page.target.title not in CHALLENGE_TITLES:
return challenged return challenged
raise
if elem is None: if elem is None:
logger.debug("Couldn't find the title, trying again") logger.debug("Couldn't find the title, trying other method...")
continue continue
if not isinstance(elem, Element):
logger.fatal("Element is a string, please report this to Byparr dev")
raise InvalidElementError
elem = elem.parent elem = elem.parent
# Get the element containing the shadow root # Get the element containing the shadow root
for _ in range(3): for _ in range(3):