thicccat688 / selenium-recaptcha-solver

ReCAPTCHA solver for selenium (Using audio).
MIT License
105 stars 37 forks source link

Add try-except block to click on reCAPTCHA image button. #9

Closed Dja8x1 closed 1 year ago

Dja8x1 commented 1 year ago

This commit adds a try-except block to the solver.py, The try block attempts to locate and click on the reCAPTCHA image button. If the button is not found within the timeout period (10 seconds), the except block catches the TimeoutException and continues without raising an error. Additionally, this try-except block checks if the reCAPTCHA challenge type is set to audio, which can occur when visiting the same website multiple times. By checking the challenge type, this change improves the stability and robustness of the reCAPTCHA solving process. This is especially relevant for users who frequently visit the same website and are likely to encounter this issue. Overall, this commit improves the reliability of the module.

While this may seem like a small change, it can make a significant difference in the reliability of the reCAPTCHA solving module. Thank you for your consideration!

thicccat688 commented 1 year ago

Hi,

I merged the PR, but I set the timeout to 1 second instead of 10 since it was causing a significant slowdown in the script's execution.

If this causes any issues for you, please let me know.

Thank you for your contribution!