Closed ProtocolNebula closed 3 weeks ago
It looks like you aren't using the special methods like uc_gui_click_captcha()
to handle CF CAPTCHAs.
Also, there's a new CDP Mode, which is more advanced than regular UC Mode.
CDP Mode is activated by calling sb.activate_cdp_mode(url)
from UC Mode. Eg:
from seleniumbase import SB
with SB(uc=True, test=True, locale_code="en") as sb:
url = "https://gitlab.com/users/sign_in"
sb.activate_cdp_mode(url)
sb.uc_gui_click_captcha()
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)
Hi,
I'm working with UC mode. Starting from two weeks ago, the website I crawl (maybe due cloudflare) is detecting that I'm not changing the computer (even using a rotative proxy).
I fixed it closing and opening again the selenium base, but is very slow because it's deleting a lot of things and I'm not sure if it's really necessary to pass through the whole process.
My code
Logs generated
Summary
I want to avoid the 1 or 2 minutes + RAM compsumition required to refresh the whole driver, the docs I found does not work. (The proxy is not the issue, it is already rotative).
Any tip/trick?
Stackoverflow / docs are not useful for this case or I didn't find the correct ones.