From 031fef2d770a72fbd9a1bfd113f09babbdcafb96 Mon Sep 17 00:00:00 2001 From: Jay <69938575+Jminding@users.noreply.github.com> Date: Thu, 18 Jul 2024 23:10:38 -0400 Subject: [PATCH] Added more words to make sure that it can detect it in English --- src/hcaptcha_solver/hcaptcha_solver.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/hcaptcha_solver/hcaptcha_solver.py b/src/hcaptcha_solver/hcaptcha_solver.py index 296ea577..2ea3ee54 100644 --- a/src/hcaptcha_solver/hcaptcha_solver.py +++ b/src/hcaptcha_solver/hcaptcha_solver.py @@ -109,7 +109,8 @@ def solve_challenge(self, wd, debug=False): def normalize_captcha_string(captcha_str): """normalizes the captcha string""" - if "Please click" not in captcha_str: + words = ["click", "press", "select", "tap", "choose", "verify", "solve", "complete", "pick", "identify", "confirm", "match", "find", "check", "validate", "indicate", "point", "pinpoint", "locate", "spot"] + if not any(word in captcha_str.lower() for word in words): print("""[WARNING] The captcha string does not appear to be english. \ This version of hcaptcha-solver only supports english captchas, \ consider changing the language of the webhandler""") @@ -143,4 +144,4 @@ def normalize_captcha_string(captcha_str): captcha_str = captcha_str.replace("Please click each image containing ","") captcha_str = captcha_str.replace("Please click on all images containing a ","") captcha_str = captcha_str.replace("Please click on all images containing ","") - return captcha_str \ No newline at end of file + return captcha_str