0

I'm using rpyc server to get data using selenium when a connection to a client is established, the problem is that the url I'm trying to access occasionally prompts a reCaptcha to fill in order to access the data needed.

I don't really need to find a way to automate a completion, what I do want is to find a way to stream the browser from the server to the client if it encounters a reCaptcha, in a manner that allows the user to interact with the browser, and fill the reCaptcha manually himself, and from there to let the server go on with the rest of his code. Something similar to Teamviewer's functionality, to implement in my setup.

I actually couldn't find any direction to follow on that subject yet, and couldn't figure out a method to try myself.

Roman
  • 37
  • 1
  • 8

1 Answers1

0

If you work with Selenium, then you have the opportunity to programmatically wait for elements or to detect elements. You could just have your program wait for the ReCaptcha element and make an output to the user in the console that he should solve the ReCaptcha. In the background your program already waits for the elements that appear when the ReCaptcha is solved. Once the user has solved the ReCaptcha, the program will automatically resume.

Lukas Nothhelfer
  • 820
  • 1
  • 7
  • 23
  • That is what I'm trying to achieve, the thing is, the webdriver is running on the server, not the client. So I'm facing the problem of how to display the browser on the client and let the user fill the reCaptcha. – Roman Jul 16 '19 at 09:27
  • @Roman Ok, now I got it. Have you tried it with [MobaXTerm](https://mobaxterm.mobatek.net/) This is a command-line tool that lets you get a GUI view on your local PC of programs on the server. Maybe this can help you in any way? – Lukas Nothhelfer Jul 16 '19 at 09:35
  • So if I got it right, I need to have MobaXTerm on client side, connect it to the server with x11 enabled, and then run my server's code on connections, that will open browsers that the client can view? Can the user interact with them also? And also can I limit the so called 'stream' to only occur when a Captcha needed to be filled? How can I use it properly with multiple client connections, can I display only the browser attached to that connection, even if there are multiple browsers open simultanously? – Roman Jul 16 '19 at 10:37
  • @Roman I can not give you a complete solution because I lack the time to work out a complete concept for you. With MobaXTerm you definitely have the opportunity to interact with the server. How and if you can use that, you have to work out yourself. – Lukas Nothhelfer Jul 16 '19 at 13:56