-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Closed
Labels
FunSomething big happened / (maybe some sarcasm)Something big happened / (maybe some sarcasm)UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP Modefeature or fix already existsUpgrade to the latest version as neededUpgrade to the latest version as neededworkaround existsYou can reach your destination if you do this...You can reach your destination if you do this...
Description
I have an script that running 24/7, no problem till some hours ago.
I updated the SeleniumBase just in case, but seems that there is an update on Cloudflare that detects the UC.
I tryied the example code, with no luck.
"""SB Manager using UC Mode for evading bot-detection."""
from seleniumbase import SB
with SB(uc=True, test=True) as sb:
url = "https://gitlab.com/users/sign_in"
sb.driver.uc_open_with_reconnect(url, 3)
if not sb.is_text_visible("Username", '[for="user_login"]'):
sb.driver.uc_open_with_reconnect(url, 4)
sb.assert_text("Username", '[for="user_login"]', timeout=3)
sb.assert_element('label[for="user_login"]')
sb.highlight('button:contains("Sign in")')
sb.highlight('h1:contains("GitLab.com")')
sb.post_message("SeleniumBase wasn't detected", duration=4)
My working code till some hours ago:
with SB(uc=True) as driver:
while True:
if driver.is_element_visible('iframe[src*="challenge"]'):
loguru.logger.error("have the iframe element.")
with driver.frame_switch('iframe[src*="challenge"]'):
try:
driver.click("span.mark")
except:
pass
driver.sleep(1.5)
else:
break
_loop_cnt += 1
driver.sleep(1.5)
if _loop_cnt > 20:
exit()
Maybe somehow I can help with the debugging?
Metadata
Metadata
Assignees
Labels
FunSomething big happened / (maybe some sarcasm)Something big happened / (maybe some sarcasm)UC Mode / CDP ModeUndetected Chromedriver Mode / CDP ModeUndetected Chromedriver Mode / CDP Modefeature or fix already existsUpgrade to the latest version as neededUpgrade to the latest version as neededworkaround existsYou can reach your destination if you do this...You can reach your destination if you do this...