diprajpatra / selenium-stealth

Trying to make python selenium more stealthy.
MIT License
629 stars 89 forks source link

Webdriver (new) fail #9

Open chimerasciences opened 3 years ago

chimerasciences commented 3 years ago

Hey, thank you so much for your awesome plugin. Unfortunately the new webdriver started failing for me. Do you have any fixes you aim to implement?

kkatayama commented 3 years ago

Try adding options.add_argument("--disable-blink-features=AutomationControlled")

from selenium import webdriver
from selenium_stealth import stealth
import time

options = webdriver.ChromeOptions()
options.add_argument("start-maximized")

# options.add_argument("--headless")

#options.add_argument("--disable-blink-features")
options.add_argument("--disable-blink-features=AutomationControlled")

options.add_experimental_option("excludeSwitches", ["enable-automation"])
options.add_experimental_option('useAutomationExtension', False)
driver = webdriver.Chrome(options=options)

stealth(driver,
        languages=["en-US", "en"],
        vendor="Google Inc.",
        platform="Win32",
        webgl_vendor="Intel Inc.",
        renderer="Intel Iris OpenGL Engine",
        fix_hairline=True,
        )
url = "https://bot.sannysoft.com/"

driver.get(url)

image

chimerasciences commented 3 years ago

you are awesome <3

joel commented 3 years ago

It still detect me.

python --version
Python 3.9.1

pip==21.0

selenium==3.141.0
selenium-stealth==1.0.6

chromedriver/88.0.4324.96/chromedriver
Screen Shot 2021-01-29 at 11 13 53 AM
kaliiiiiiiiii commented 1 year ago

You could try using https://github.com/kaliiiiiiiiii/Selenium-Profiles or undetected-chromedriver