Skip to content

SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.

[fix] yandex engine: capture captcha from header instead of url path (#5417)

Aadnizb1918dd12110
diff --git a/searx/engines/yandex.py b/searx/engines/yandex.py
index 2c6984fdc..77b03067b 100644
--- a/searx/engines/yandex.py
+++ b/searx/engines/yandex.py
@@ -35,7 +35,7 @@ content_xpath = './/div[@class="b-serp-item__content"]//div[@class="b-serp-item_
def catch_bad_response(resp):
- if resp.url.path.startswith('/showcaptcha'):
+ if resp.headers.get('x-yandex-captcha') == 'captcha':
raise SearxEngineCaptchaException()