[fix] karmasearch engine: setting Referer header to bypass bot detection (#5953)

This commit is contained in:
Aadniz
2026-04-05 03:59:39 +02:00
committed by GitHub
parent 69f04d59dc
commit 474b0a55b0

View File

@@ -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)}"