diprajpatra / selenium-stealth

Trying to make python selenium more stealthy.
MIT License
650 stars 90 forks source link

Is this remote webdriver supported? #40

Open abosaad11 opened 1 year ago

abosaad11 commented 1 year 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.

markmelnic commented 3 months ago

I created a fork of this package and it's now supported stealthenium

cdekort commented 3 months ago

Was literally just looking for this @markmelnic

markmelnic commented 3 months ago

@cdekort Literally released 18 mins ago, give it a star )