-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There's a new UC Mode video showing how it works #2213
Comments
hi @mdmintz . |
@idan1109 Show me the code you used. And the output of |
Hi @mdmintz , I executed the code you presented above and did not pass the check. It stops after clicking the 'verify' checkbox. The version is |
@yczheng0 Thanks for catching that and providing details to reproduce the issue! It was a regression in version |
Thanks @mdmintz for your great work! It works. |
Hi @mdmintz , sorry to bother again. When the code executes to click the verify checkbox, the page will be kept in a captcha loop, i.e. always requiring clicking the checkbox. Same problem mentioned in undetected-chromedriver/#1543. |
Hi @yczheng0, Assuming everything is installed correctly and you have UC Mode activated, it shouldn't be forcing you to click the checkbox at all. There are bonus methods that you can use to help: driver.uc_open(url)
driver.uc_open_with_tab(url)
driver.uc_open_with_reconnect(url, reconnect_time=None)
driver.uc_click(selector) (As talked about in https://www.youtube.com/watch?v=5dMFI3e85ig) |
@yczheng0 is correct. I also did try with all the four methods mentioned by you above. Also both the methods in youtube video including using sb context. But i think it still does get detected at "https://nowsecure.nl/" by cloudfare. It won't go past clicking on the checkbox. |
@yczheng0 Which example are you running? SeleniumBase/examples/verify_undetected.py is working for me. |
@mdmintz I ran SeleniumBase/examples/raw_uc_mode.py, which resulted in infinite loop. SeleniumBase/examples/verify_undetected.py is working without clicking. |
@yczheng0
That shouldn't happen if you just run
Great! |
Hi @mdmintz i am able to get detected on a website which is cloudflare turnstile enabled |
@diptilenka Show me the code you used. It sounds like you modified the script from examples/verify_undetected.py with a different URL, but you never modified the assertion statement to look for something else. The |
@mdmintz Yes i changed the URL , but the cloud flare shown like this , after clicking its saying failed |
@diptilenka That's a form turnstile. (I can see the password field above it.) Those work differently from turnstiles that aren't meant to be clicked at all if the system thinks you're human. The form turnstile must be clicked by both humans and bots, so it works a bit differently. See the examples for clicking form turnstiles: |
@mdmintz I will look into those examples, but should i fill the password and username before clicking "Verify you are human" checkbox for showing success? If we open that website in normal human way after 12 seconds it automatically shows success, and no click on that check box shown |
If that's actually the case, then use If that's not the case, do the turnstile click first before filling out the form. (See the examples.) |
@mdmintz Thanks It worked and moving to login and other parts. will ping you once i stuck in somewhere. :) But at first its open to verify as human and after some seconds it opens another windows and shown success. |
Hey, i want to tell you thanks, you're the best, did the great work. A couple of days ago i interfered with some problem, i can’t log in twitch with seleniumbase, it detects me everytime i try, whatever i did, can you give me a clue, is it possible? 😅 I use python 3.11 and macOS m series |
The two main causes of getting detected in UC Mode (which are both easily handled) are:
To see if UC Mode can work on your site (before adjusting for timing & special methods), load your site with the following script, which drops in a Python from seleniumbase import SB
with SB(uc=True) as sb:
sb.driver.uc_open_with_reconnect(URL, reconnect_time="breakpoint") From the breakpoint, manually perform that actions that you want. If you don't get detected, then good news: Once you adjust the timing and use After you've performed your manual actions in the web browser, type See #2384 (comment) for more info about timing customizations and the special breakpoint in UC Mode. Also see SeleniumBase/examples/raw_form_turnstile.py for an example of special clicks in UC Mode. |
Thanks a lot for the detailed response, but, unfortunately, it seems doesn't work even with this script and manual actions: from seleniumbase import SB with SB(uc=True) as sb: The twitch site detected me every time and notifies me, when I click log in button or register button, after filled the forms with message: "you have a old browser version" |
Thanks for the video instruction @mdmintz ! In the video you briefly mentioned we need "reconnect()" when evading CF because it has something to do with the session storage in chrome. Could you elaborate a little more on what that means? It would be even better if there's some example for illustration purposes. Also do you know if this is the same reason we need different user profiles when "UC" vs. "Non UC"? |
@Tongcheng There's no mention of "session storage" anywhere in the video. I think you need to rewatch it. The The |
UC Mode Video 2 is ready! |
some website detect cdc_ variable, and every-time selenium connect to chrome drive, it add the variable back, sometimes remove_cdc_props_as_needed() is not even working |
hi mdmintz i need your help, i am trying to bypass claudflare but when i test yours examples:
its not working, not click the checkbox, i am using linux ubuntu and i already try uc_gui_handle_captcha and uc_gui_click_captcha i get this error: raceback (most recent call last): |
See the UC Mode docs as well as the 3rd UC Mode video for updated information: |
There's a new UC Mode video showing how it works, and how it fixes bugs with undetected-chromedriver:
https://www.youtube.com/watch?v=5dMFI3e85ig
Note the improvements made:
HeadlessChrome
toChrome
)pytest-xdist
.user-data-dir
correctly.Many of these fixes can be back-ported easily to undetected-chromedriver. (Explanation in the video of how to do that, such as using
requests.get(url)
before navigating to a URL to know if you need to disconnect/reconnect the driver from Chrome.)Here's a script with retries and a captcha-click failsafe for bypassing detection:
The presentation slides were autogenerated by running: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/presenter/uc_presentation.py
Here are some existing examples that use
--uc
mode:The text was updated successfully, but these errors were encountered: