diff options
| author | Aadniz <8147434+Aadniz@users.noreply.github.com> | 2026-04-05 03:59:39 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-04-05 03:59:39 +0200 |
| commit | 474b0a55b0cb09a3bb6e18d5579836058b075584 (patch) | |
| tree | 50d434af20a6c081025b74d0e93fe3e68859ef95 | |
| parent | 69f04d59dc1ac0707f91a962e8c18c388ae0294e (diff) | |
[fix] karmasearch engine: setting Referer header to bypass bot detection (#5953)
| -rw-r--r-- | searx/engines/karmasearch.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/searx/engines/karmasearch.py b/searx/engines/karmasearch.py index 140002c3c..a019ec885 100644 --- a/searx/engines/karmasearch.py +++ b/searx/engines/karmasearch.py @@ -64,6 +64,9 @@ def request(query: str, params: "OnlineParams") -> None: if params["time_range"]: args["freshness"] = time_range_map[params["time_range"]] + # Needed to circumvent Cloudflare bot protection + params['headers']['Referer'] = "https://karmasearch.org" + params["url"] = f"{base_url}/search/{search_type}?{urlencode(args)}" |
