-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
How to run UC Remotely "driver = webdriver.Remote()" #617
Comments
Hi @ultrafunkamsterdam , |
Selenium chromedriver and undetected-chromedriver behave quite differently:
So I'm not sure how you'll patch the driver on your remote PC and be sure your browser has been launched first (so that it's initialized just as is your regular browser). Maybe a better strategy would be to use RPyC ? |
Thank you for your input @sebdelsol ! I'll try to figure out a way how to patch it. |
Hi Team, agree with Anticope12, fantastic tool, thanks! https://github.com/SeleniumHQ/docker-selenium/blob/trunk/docker-compose-v3-swarm.yml and the goal is to include this patch when launching the driver sessions with the line: driver = webdriver.Remote("http://192.168.0.174:4445/wd/hub") I'm not so sure how to implement this but maybe we can join forces here and make some something |
Hi @gonnsuarez , Chrome and Firefox For Chrome and Firefox you don't need to do anything special. Just instantiate the webdriver as you would normally with webdriver.Chrome() or webdriver.Firefox() passing in any desired capabilities and browser specific options for Chrome or Firefox , such as the executable path, headless mode etc. Selenium Wire also has it's own options that can be passed in the seleniumwire_options attribute. Remote Selenium Wire has limited support for using the remote webdriver client. When you create an instance of the remote webdriver, you need to specify the hostname or IP address of the machine (or container) running Selenium Wire. This allows the remote instance to communicate back to Selenium Wire with its requests and responses. options = { |
Hi @gonnsuarez , Any news? |
Hi @Anticope12, I'm not sure of understanding how this selenium wire module can help us in the objetive of implementing the undetected chromedriver in a remote computer, I will appreciate if you can explain the idea a little bit further, Meanwhile, I tried the idea given by @auror44 in this other issue opened Maybe it's because it applies better in my scenario of running a chrome swarm in selenium grid docker containers. In a simple test i tried this: but with no luck, it seems to have no effect, but well, is just the beggning. I will continue following thes opened issues hoping in the short term find some kind of workaround util an official support for remote drivers is launched! |
Still looking very forward to be able to utilize undetected-chromedriver with webdriver.Remote() 🙏 |
I've done some further testing trying to adapt calls that uc.Chrome makes on selenium library but I founded that the key problem is what sebdelsol mention in this comment: In order to be able to make it work in "remote" mode is necessary to deeply understand how the selenium grid works and try to modify something between these modules and specially the node so in that way the chrome browser launches first and then the chrome driver launches separately, attaches to that browser, and register his session to the event bus and session map. I think is not a simply work, maybe someone with a a deep understanding of https://github.com/SeleniumHQ/docker-selenium#fully-distributed-mode---router-queue-distributor-eventbus-sessionmap-and-nodes can help us! |
Thank you so much @sebdelsol @gonnsuarez for your explanation and the support 🙇♂️ |
Any news? |
Giving up on this idea I've started working with a windows 10 virtual machine with python, undetected_chromedriver and a little rpyc server that works as kind of "chrome hub" and so far is working great. I know that thinking on a w10 vm sounds like shit but the fact that is only used for the browsers and those browsers are running the more "realistic" way it helps a lot, I do not have to bother with some strange errors or crashes or bot detections. With rpyc you can run your actual scrapping python code wherever you want and the vm is only for browsing. |
Can you share more information on how you did it? code samples? |
Hello team,
Fantastic tool. I'm trying to run UC via a remote comand_exceutor="http://SERVIER.IP:4444/wd/hub"
There are the following Threads Already open without any solution.
Looking forward to hearing a workaround for this.
Thank you,
#394
#462
#594
The text was updated successfully, but these errors were encountered: