Closed ludwig7685 closed 1 year ago
Hey, thanks for testing the code! Comments do not have an impact on code execution, so the issue lies somewhere different than the "h". In your case, 'solve_challenge' expects an open challenge view, but recognizes that no open challenge is active. It then throws the Exception explaining the error. Most likely something was clicked before the code could execute or the captcha timed out. This sometimes happens as the website reloads, things take longer to load than expected etc. It's hard to catch all the possible errors with selenium, but I will try my best to fix it so the program retries solving the captcha instead of aborting
For me the Verbose=True
argument was giving out an error prob becaz of the pkg version but it was fixed after I updated the pkg
code:
from hcaptcha_solver import hcaptcha_solver # hcaptcha_solver-0.2.13
from selenium import webdriver
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(options=options)
captcha_solver = hcaptcha_solver.Captcha_Solver(verbose=True)
options.add_experimental_option('prefs', {'intl.accept_languages': 'en,en_US'})
driver.get("https://accounts.hcaptcha.com/demo")
captcha_solver.is_captcha_present(driver)
captcha_solver.solve_captcha(driver)
@Shaeikh the verbose argument was introduced in v0.2.13
I am updating the repo quite actively at the moment so make sure to stay up to date. Thanks for your help!
This issue is adressed in v0.2.14, as the solver restarts the solving process when it encounters an error during the challenge solving steps
if i copy testing/test.py ( the code copying ) and past it in app.py, run app.py, i get hcaptcha solved!
if i copy the example code in READ.md, i get a error!
app.py:
main.py:
console:
its REALLY WEIRD!!!!!!!!!! I removed the "h" in line 10 last word from "hcaptcha" !!!!!!!! And it works!!!!