From b385f320984fd84f8eb3021d4195551ad0ae3eff Mon Sep 17 00:00:00 2001 From: Bnyro Date: Mon, 23 Jun 2025 22:47:19 +0200 Subject: [PATCH] [fix] uxwing: doesn't work / forbidden the engine is currently broken because - it requires a normal user agent (spoofed) - it has some additional fingerprinting if using http2 --- searx/engines/uxwing.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/searx/engines/uxwing.py b/searx/engines/uxwing.py index 98408432b..d00dbd2b4 100644 --- a/searx/engines/uxwing.py +++ b/searx/engines/uxwing.py @@ -4,7 +4,7 @@ from urllib.parse import quote_plus from lxml import html -from searx.utils import eval_xpath, eval_xpath_list, extract_text +from searx.utils import eval_xpath, eval_xpath_list, extract_text, gen_useragent about = { "website": 'https://uxwing.com', @@ -17,10 +17,12 @@ about = { categories = ['images', 'icons'] base_url = "https://uxwing.com" +enable_http2 = False def request(query, params): params['url'] = f"{base_url}/?s={quote_plus(query)}" + params['headers'] = {'User-Agent': "Mozilla/5.0 (X11; Linux x86_64; rv:139.0) Gecko/20100101 Firefox/139.0"} return params