Closed pythondeveloperz closed 10 months ago
For starters, you can't combine SB mobile
mode with selenium-stealth
because selenium-stealth
overrides mobile
mode settings. For bypassing automation detection, choose between:
selenium-stealth
If your goal is to pass the unmasked-fingerprint test and the no-automation-framework-detected test, then use:
from seleniumbase import Driver
driver = Driver(uc=True)
driver.uc_open_with_reconnect("https://pixelscan.net", "breakpoint")
driver.quit()
Combining selenium-stealth
with UC Mode will make it such that they still can't detect that you're using an automation framework, but they may still be able to see that you're masking your fingerprint.
If you use selenium-stealth
with UC Mode, you can still bypass Cloudflare:
from seleniumbase import Driver
from selenium_stealth import stealth
driver = Driver(uc=True)
stealth(
driver,
languages=["en-US", "en"],
vendor="Google Inc.",
platform="Android",
webgl_vendor="Google Inc. (Imagination Technologies)",
renderer="ANGLE (Imagination Technologies,PowerVR Rogue GE8320, OpenGL ES 3.2)",
fix_hairline=True,
)
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", "breakpoint")
driver.quit()
Or you can use UC Mode with Mobile Mode:
(Use with driver.get()
instead of driver.uc_open_with_reconnect()
)
from seleniumbase import Driver
driver = Driver(uc=True, mobile=True)
driver.get("https://nowsecure.nl/#relax")
driver.sleep(6)
driver.quit()
But if you just need to get past the Turnstile, here's the simplest, most reliable way:
from seleniumbase import Driver
driver = Driver(uc=True)
driver.uc_open_with_reconnect("https://nowsecure.nl/#relax", "breakpoint")
driver.quit()
> from seleniumbase import Driver
>
> driver = Driver(uc=True,mobile=True)
> driver.get("https://pixelscan.net")
> input("any:")
> driver.quit()
when i use UC mode + Mobile it didnt pass as i use UC mode only i upload you screenshots appear the result
`from selenium_profiles import webdriver from selenium_profiles.profiles import profiles
profile = profiles.Android()
driver = webdriver.Chrome(profile, uc_driver=True, seleniumwire_options=True) # or pass seleniumwire-options
checkout headers
driver.get("https://pixelscan.net") input("Press ENTER to quit..") driver.quit() exit()`
https://github.com/kaliiiiiiiiii/Selenium-Profiles
when i use this package for mobile emulation it passes the point of masking fingerprint is it possible to use this package with Seleniumbase instead of Seleniumwire ?
All that matters is: "No automation framework detected". That's the whole point of UC Mode: To appear human.
A website will know you're masking your fingerprint if you use mobile mode, but they still won't detect your automation framework because you also have UC Mode:
If your goal is to pass the unmasked-fingerprint test and the no-automation-framework-detected test, then use this:
from seleniumbase import Driver
driver = Driver(uc=True)
driver.uc_open_with_reconnect("https://pixelscan.net", "breakpoint")
driver.quit()
That means not using mobile mode. Just use regular UC Mode.
`from selenium_profiles import webdriver from selenium_profiles.profiles import profiles profile = profiles.Android() driver = webdriver.Chrome(profile, uc_driver=True, seleniumwire_options=True) # or pass seleniumwire-options
checkout headers
driver.get("https://pixelscan.net") input("Press ENTER to quit..") driver.quit() exit()`
https://github.com/kaliiiiiiiiii/Selenium-Profiles
when i use this package for mobile emulation it passes the point of masking fingerprint is it possible to use this package with Seleniumbase instead of Seleniumwire ?
what about to combine this package with SB?
It sounds like you should ask the maintainer of selenium-profiles for combining their package with seleniumbase. It should be easy for them to do it if they swap out the selenium-wire driver with the seleniumbase driver.
Running in colab, with UC=True, without mobile, also seems to have "pixelscan.net" saying "I'm masking the fingerprint". Does this mean pixelscan's hardware fingerprint can detect if you're in a docker (Colab is in docker)?
with SB(uc=True, xvfb=True, proxy="<proxy>") as sb:
sb.driver.uc_open_with_reconnect("https://pixelscan.net", 30)
sb.driver.save_screenshot("screenshot.png")
@Tongcheng Possibly due to Colab or Docker or the proxy used. Regular SeleniumBase UC Mode works fine on that page.
Thanks @mdmintz for the reply! I actually started a fresh EC2/ubuntu image, installed SeleniumBase without docker, but it seems PixelScan reports hardware fingerprint masking detected:
Do you know if it's due to Linux?
@Tongcheng It thinks you're spoofing your location. SeleniumBase UC Mode doesn't change your location, so you might be doing something separately that's causing your issue, such as using a bad proxy.
hello please i try to use SB with seleniumstealth but not pass iphey.com , pixelscan.net
this is my code 👍