Closed GoldDust69 closed 3 years ago
I've finally managed to resolve this myself. In case anyone else is struggling with a similar issue, here was my solution:
I've finally managed to resolve this myself. In case anyone else is struggling with a similar issue, here was my solution:
- Open the console and execute the following cmd: __grecaptcha_cfg.clients
- Find the path which has the callback function, in my case it's ___grecaptcha_cfg.clients[0].O.O
- Use the following code: driver.execute_script(f"___grecaptcha_cfg.clients[0].O.O.callback('{new_token}')") (Remember to change the path accordingly)
When I put to print only the _grecaptchacfg it appears "none", how do I print the value of grecaptcha_cfg with driver.execute_script?
I've finally managed to resolve this myself. In case anyone else is struggling with a similar issue, here was my solution:
1. Open the console and execute the following cmd: __grecaptcha_cfg.clients 2. Find the path which has the callback function, in my case it's ___grecaptcha_cfg.clients[0].O.O 3. Use the following code: driver.execute_script(f"___grecaptcha_cfg.clients[0].O.O.callback('{new_token}')") (Remember to change the path accordingly)
sadly this isn't the solution. upon executing the command you'll somehow get a undefined error. (the site use hcaptcha)
Good day, I have the following script written and everything seems to work okay up until it needs to submit the new captcha token where it fails to find the element. I've tried several ways but cannot seem to find the correct. I would be ever so grateful if someone could kindly help me. Here is the code:
UPDATE: After reading #77 I even tried changing the 2 lines to this:
Sadly still no luck, I'm guessing I somehow need to interact with the callback but unsure how. Here is the error I received:
UPDATE2: Just to clarify in case someone does get chance to look at this and wants to replicate. The recaptcha happens for me when you login (you can have a free account) and only when using this automation.