-
Notifications
You must be signed in to change notification settings - Fork 1.4k
-
driver = Driver(uc=True, agent=agent)
url = "https://visa.vfsglobal.com/tur/en/pol/login"
driver.uc_open_with_reconnect(url, reconnect_time=40)
I can make the automation work on the first (login) page by using reconnect_time, but there is an additional Cloudflare check on the second page after logging in which detects the Selenium and fails to pass even if I manually click it. @mdmintz
Beta Was this translation helpful? Give feedback.
All reactions
Use methods such as sb.uc_gui_click_captcha()
to get past the CAPTCHA.
(Read the docs here: SeleniumBase/help_docs/uc_mode.md)
Also be sure you are using seleniumbase
4.29.2
(or newer if available).
Replies: 4 comments 18 replies
-
Use methods such as sb.uc_gui_click_captcha()
to get past the CAPTCHA.
(Read the docs here: SeleniumBase/help_docs/uc_mode.md)
Also be sure you are using seleniumbase
4.29.2
(or newer if available).
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
Use methods such as
sb.uc_gui_click_captcha()
to get past the CAPTCHA. (Read the docs here: SeleniumBase/help_docs/uc_mode.md) Also be sure you are usingseleniumbase
4.29.2
(or newer if available).
I was trying everything one by one and ended up with a simple driver.disconnect() and driver.reconnect(15) being working. Thank you. Maybe a bit out of topic but is there an easy way to use/automate OTP code that comes as SMS on every login?
Beta Was this translation helpful? Give feedback.
All reactions
-
If you know the 16-character code that generates the 6-digit code, then there are built-in SeleniumBase methods for handling that. Here's an example test that uses MFA: SeleniumBase/examples/test_mfa_login.py
Beta Was this translation helpful? Give feedback.
All reactions
-
good morning khanjui,
Can you share you code to bypass the first login please
Beta Was this translation helpful? Give feedback.
All reactions
-
from seleniumbase import SB with SB(uc=True, incognito=True) as sb: sb.uc_open_with_reconnect( "https://visa.vfsglobal.com/are/en/fra/login", 12 ) sb.click_if_visible("#onetrust-reject-all-handler") sb.uc_gui_click_captcha()
Beta Was this translation helpful? Give feedback.
All reactions
-
i try this but not checking the claudflare checkbox
Beta Was this translation helpful? Give feedback.
All reactions
-
@mdmintz Man! you're a legend.
Beta Was this translation helpful? Give feedback.
All reactions
-
@mdmintz @khanjui It successfully solves the Cloudflare CAPTCHA on the first attempt, but when I click the sign-in button, it prompts me to resolve it again. Could you please assist me with this issue?
This is my code snippet:
def access_website_with_solution():
email = 'fahadali7200@gmail.com'
password = ''
with SB(uc=True, incognito=True) as sb:
sb.uc_open_with_reconnect(
"https://visa.vfsglobal.com/are/en/fra/login", 17
)
sb.click_if_visible("#onetrust-reject-all-handler")
email_input = sb.find_element(By.ID, 'email')
email_input.send_keys(email)
password_input = sb.find_element(By.ID, 'password')
password_input.send_keys(password)
signin_button = sb.find_element(By.XPATH,'/html/body/app-root/div/div/app-login/section/div/div/mat-card/form/button')
signin_button.click()
time.sleep(5)
Beta Was this translation helpful? Give feedback.
All reactions
-
That situation was covered in the 3rd UC Mode video tutorial: https://www.youtube.com/watch?v=-EpZlhGWo9k
ScreenshotYou used a regular click before encountering a CAPTCHA, which is how they detected you. Need to use uc_click(selector)
.
If they catch you (because you didn't use stealth), then they may IP-block you, as they did:
ScreenshotBeta Was this translation helpful? Give feedback.
All reactions
-
❤️ 2
-
@mdmintz I repeat you're a gem. Thanks a lot for saving my life. 🫠
Beta Was this translation helpful? Give feedback.
All reactions
-
❤️ 1
-
@khanjui How did you pass the 2nd cloudflare, my friend? I can pass the 1st one too. I get stuck on the 2nd one and I get a failed message. Can you help me?
Beta Was this translation helpful? Give feedback.
All reactions
-
Yes, I was able to pass the OTP part.
Brother can you help me too I need you
Beta Was this translation helpful? Give feedback.
All reactions
-
@tengriG telegram hesabım yaz kardeşim
Beta Was this translation helpful? Give feedback.
All reactions
-
@jesushealth could you also help me? I cant pass cloudflare validation which opens on new page after form submition. I'm using uc mode. Works fine when manually clicking but gui captcha click fails
Beta Was this translation helpful? Give feedback.
All reactions
-
@krzysztofkub tg : @tengriG I can help you can send a message
Beta Was this translation helpful? Give feedback.
All reactions
-
People should be switching to SeleniumBase CDP Mode.
Regular UC Mode isn't always enough for this anymore.
Beta Was this translation helpful? Give feedback.