diprajpatra / selenium-stealth

Trying to make python selenium more stealthy.
MIT License
607 stars 88 forks source link

Is this remote webdriver supported? #40

Open abosaad11 opened 8 months ago

abosaad11 commented 8 months ago

I know that Selenium stealth does not support remote webdriver. BUT, is 127.0.0.1 really "remote"? Is there any hope of making this work:

driver = webdriver.Remote(
   command_executor='http://127.0.0.1:4444/wd/hub',
   options=webdriver.ChromeOptions()
)

stealth(driver,
        languages=["en-US", "en"],
        vendor="Google Inc.",
        platform="Win32",
        webgl_vendor="Intel Inc.",
        renderer="Intel Iris OpenGL Engine",
        fix_hairline=True,
        )

Currently I get the same error, whether the Selenium Grid was local "127.0.0.1" or otherwise:

root@dc3cb4f8e581:/home/pi/tl# python3 tl-both
Traceback (most recent call last):
  File "tl-both", line 36, in <module>
    stealth(driver,
  File "/usr/local/lib/python3.8/dist-packages/selenium_stealth/__init__.py", line 41, in stealth
    raise ValueError("driver must is selenium.webdriver.Chrome, currently this lib only support Chrome")
ValueError: driver must is selenium.webdriver.Chrome, currently this lib only support Chrome

My goal is to see what's happening on screen sometimes. If you have any other suggestions to do that please do. Thank you.