searxng/searxng · error · ValueError
invalid category: %s
Error message
invalid category: %s
What it means
Error "invalid category: %s" thrown in searxng/searxng.
Source
Thrown at searx/engines/vuhuv.py:43
"use_official_api": False,
"require_api_key": False,
"results": "HTML",
}
paging = True
base_url = "https://vuhuv.com"
vuhuv_category = "general"
"""Supported categories are ``general``, ``videos`` and ``images``."""
# corresponds to the "k" query param
category_map = {"general": 1, "images": 2, "videos": 3}
def init(_):
if vuhuv_category not in category_map:
raise ValueError("invalid category: %s" % vuhuv_category)
def request(query: str, params: "OnlineParams") -> None:
# the purpose of "d" and "dh" are unknown, but the website
# sends them, and without them the results are different
args = {"k": category_map[vuhuv_category], "p": params["pageno"], "q": query, "d": 1, "dh": 1}
params["url"] = f"{base_url}/veri2/?{urlencode(args)}"
params["headers"]["Referer"] = f"{base_url}/"
def _general_results(doc: "ElementBase") -> EngineResults:
res = EngineResults()
for result in eval_xpath_list(doc, "//div[contains(@class, 'sonuc')]/div"):
(
res.add(
res.types.MainResult(
url=extract_text(eval_xpath(result, "./a/@href")) or "",
title=extract_text(eval_xpath(result, "./a/span")) or "",View on GitHub (pinned to 9fea41204f)
When it happens
Trigger: Thrown at searx/engines/vuhuv.py:43 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of searxng/searxng@9fea41204f (2026-08-27).
Data as JSON: /api/errors/987f5acbeeddbd29.
Report an issue: GitHub.