SearXNG is a free internet metasearch engine which aggregates results from various search services and databases. Users are neither tracked nor profiled.
Python bingbravedegoogleduckduckgogooglemetasearchprivacypythonqwantsearchsearch-enginesearxsearxngstartpageyahoo
[mod] engines: remove uses of `enable_http2 = False`
Bnyro4781754dc461
diff --git a/searx/engines/luxxle.py b/searx/engines/luxxle.pyindex a7bc71f09..37da21d36 100644--- a/searx/engines/luxxle.py+++ b/searx/engines/luxxle.py@@ -37,17 +37,13 @@ about = {}categories = []-safeseach = True+safesearch = Truebase_url = "https://luxxle.com"luxxle_categ = "search""""Supported categories: "search", "news", "images", "videos"."""-# otherwise all requests get blocked (http2-fingerprinted probably)-enable_http2 = False--safe_search_map = {0: "Off", 1: "Moderate", 2: "Strict"}diff --git a/searx/engines/pexels.py b/searx/engines/pexels.pyindex 82d4d702a..67bbe4648 100644--- a/searx/engines/pexels.py+++ b/searx/engines/pexels.py@@ -8,7 +8,7 @@ from urllib.parse import urlencodefrom lxml import htmlfrom searx.result_types import EngineResults-from searx.utils import eval_xpath_list, gen_useragent+from searx.utils import eval_xpath_listfrom searx.enginelib import EngineCachefrom searx.exceptions import SearxEngineAPIException, SearxEngineAccessDeniedExceptionfrom searx.network import get@@ -44,8 +44,6 @@ SECRET_KEY_DB_KEY = "secret-key"CACHE: EngineCache"""Cache to store the secret API key for the engine."""-enable_http2 = False-def setup(engine_settings: dict[str, t.Any]) -> bool:global CACHE # pylint: disable=global-statement@@ -56,13 +54,7 @@ def setup(engine_settings: dict[str, t.Any]) -> bool:def _get_secret_key():resp = get(base_url,- headers={- # circumvents Cloudflare bot protections- "User-Agent": gen_useragent(),- "Referer": base_url,- "Sec-GPC": "1",- "Connection": "keep-alive",- },+ headers={"Referer": base_url},)if resp.status_code != 200:@@ -105,8 +97,6 @@ def request(query, params):params["headers"]["secret-key"] = secret_key- return params-def response(resp):res = EngineResults()diff --git a/searx/engines/pixabay.py b/searx/engines/pixabay.pyindex 3a01d8af0..64c35a36f 100644--- a/searx/engines/pixabay.py+++ b/searx/engines/pixabay.py@@ -27,9 +27,6 @@ time_range_support = Truesafesearch_map = {0: 'off', 1: '1', 2: '1'}time_range_map = {'day': '1d', 'week': '1w', 'month': '1m', 'year': '1y'}-# using http2 returns forbidden errors-enable_http2 = False-def request(query, params):args = {@@ -50,8 +47,6 @@ def request(query, params):# prevent automatic redirects to first page on paginationparams['allow_redirects'] = False- return params-def _image_result(result):return {diff --git a/searx/engines/stocksnap.py b/searx/engines/stocksnap.pyindex 3c532d0bb..85eeccbda 100644--- a/searx/engines/stocksnap.py+++ b/searx/engines/stocksnap.py@@ -21,8 +21,6 @@ about = {"require_api_key": False,"results": "JSON",}-# otherwise all requests get blocked, probably HTTP2 fingerprinting-enable_http2 = Falsebase_url = "https://stocksnap.io"cdn_url = "https://cdn.stocksnap.io"diff --git a/searx/engines/uxwing.py b/searx/engines/uxwing.pyindex 59bb75afc..fd845f980 100644--- a/searx/engines/uxwing.py+++ b/searx/engines/uxwing.py@@ -17,12 +17,10 @@ about = {categories = ['images', 'icons']base_url = "https://uxwing.com"-enable_http2 = Falsedef request(query, params):params['url'] = f"{base_url}/?s={quote_plus(query)}"- return paramsdef response(resp):diff --git a/searx/engines/yep.py b/searx/engines/yep.pyindex e87a1bef2..81c60d627 100644--- a/searx/engines/yep.py+++ b/searx/engines/yep.py@@ -30,8 +30,6 @@ web_base_url = "https://yep.com"safesearch = Truesafesearch_map = {0: "off", 1: "moderate", 2: "strict"}-enable_http2 = False-results_per_page = 20_IMPORT_RE = re.compile(r"import\"(.*?)\";")@@ -50,9 +48,6 @@ def request(query: str, params: "OnlineParams") -> None:{"Referer": f"{web_base_url}/","Origin": web_base_url,- "Sec-Fetch-Dest": "empty",- "Sec-Fetch-Mode": "cors",- "Sec-Fetch-Site": "same-site",})