mirror of
https://github.com/ThePhaseless/Byparr.git
synced 2025-03-15 17:50:21 +08:00
tweaks
This commit is contained in:
parent
518cf1de42
commit
d1bccc3e4c
@ -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):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user