chore: кеширование для методов решения капчи

This commit is contained in:
protokey committed 2026-09-21 19:35:43 +04:00
1 parent 1cfd9bafef
commit b339d43d53
2 files changed
+1 -3

No files matched your search

+1 -2
View File
@@ -71,8 +71,7 @@ class ReCaptchaSolver(Solver):
assert found, "Recaptcha callback function not found" assert found, "Recaptcha callback function not found"
except Exception as e: except Exception as e:
log.warning("JS navigation error", exc_info=True) log.warning("JS navigation error", exc_info=True)
else:
self.captcha_solver.recaptcha._clear_cache()
log.debug("Все готово. Проверяем еще раз.") log.debug("Все готово. Проверяем еще раз.")
return return
-1
View File
@@ -64,7 +64,6 @@ class Captcha:
resp = await self._run(self._solver.hcaptcha, site_key, url, invisible=is_invisible) resp = await self._run(self._solver.hcaptcha, site_key, url, invisible=is_invisible)
return resp return resp
@cached_persistent('recaptcha')
async def recaptcha(self, url, site_key): async def recaptcha(self, url, site_key):
resp = await self._run(self._solver.recaptcha, site_key, url) resp = await self._run(self._solver.recaptcha, site_key, url)
return resp return resp