diff options
| author | Aadniz <8147434+Aadniz@users.noreply.github.com> | 2025-10-27 08:33:07 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-10-27 08:33:07 +0100 |
| commit | ea4a55fa57a4682f48265d50a9d816801ead0b88 (patch) | |
| tree | 11c36b7dca8cbfc12ccd32b2cc52a400dce4c99a | |
| parent | d514dea5cc3ff12e35d9f7ee5adac2b47f5818c6 (diff) | |
[fix] qwant engine: set header Accept-Language to bypass bot detection (#5382)
Set HTTP header Accept-Language [1] for the Qwant engine.
Qwant does not seem to work on any SearXNG instance right now, and this is a fix
for this issue.
During testing, it seems like setting the Accept-Language gives more success for
bypassing bot detection (tested with a few ~20 searches).
[1] https://docs.searxng.org/dev/engines/enginelib.html#searx.enginelib.Engine.send_accept_language_header
| -rw-r--r-- | searx/engines/qwant.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/qwant.py b/searx/engines/qwant.py index 3c9d40e10..931a60a6c 100644 --- a/searx/engines/qwant.py +++ b/searx/engines/qwant.py @@ -82,6 +82,9 @@ max_page = 5 """5 pages maximum (``&p=5``): Trying to do more just results in an improper redirect""" +# Otherwise Qwant will return 403 if not set +send_accept_language_header = True + qwant_categ = None """One of ``web-lite`` (or ``web``), ``news``, ``images`` or ``videos``""" |