{"record":{"id":"987f5acbeeddbd29","repo":"searxng/searxng","slug":"invalid-category-s-987f5a","errorCode":null,"errorMessage":"invalid category: %s","messagePattern":"invalid category: (.+?)","errorType":"validation","errorClass":"ValueError","httpStatus":null,"severity":"error","filePath":"searx/engines/vuhuv.py","lineNumber":43,"sourceCode":"    \"use_official_api\": False,\n    \"require_api_key\": False,\n    \"results\": \"HTML\",\n}\n\npaging = True\n\nbase_url = \"https://vuhuv.com\"\nvuhuv_category = \"general\"\n\"\"\"Supported categories are ``general``, ``videos`` and ``images``.\"\"\"\n\n\n# corresponds to the \"k\" query param\ncategory_map = {\"general\": 1, \"images\": 2, \"videos\": 3}\n\n\ndef init(_):\n    if vuhuv_category not in category_map:\n        raise ValueError(\"invalid category: %s\" % vuhuv_category)\n\n\ndef request(query: str, params: \"OnlineParams\") -> None:\n    # the purpose of \"d\" and \"dh\" are unknown, but the website\n    # sends them, and without them the results are different\n    args = {\"k\": category_map[vuhuv_category], \"p\": params[\"pageno\"], \"q\": query, \"d\": 1, \"dh\": 1}\n    params[\"url\"] = f\"{base_url}/veri2/?{urlencode(args)}\"\n    params[\"headers\"][\"Referer\"] = f\"{base_url}/\"\n\n\ndef _general_results(doc: \"ElementBase\") -> EngineResults:\n    res = EngineResults()\n    for result in eval_xpath_list(doc, \"//div[contains(@class, 'sonuc')]/div\"):\n        (\n            res.add(\n                res.types.MainResult(\n                    url=extract_text(eval_xpath(result, \"./a/@href\")) or \"\",\n                    title=extract_text(eval_xpath(result, \"./a/span\")) or \"\",","sourceCodeStart":25,"sourceCodeEnd":61,"githubUrl":"https://github.com/searxng/searxng/blob/9fea41204fdfa7a5cfa15b0ebd12904c520478ce/searx/engines/vuhuv.py#L25-L61","documentation":"Error \"invalid category: %s\" thrown in searxng/searxng.","triggerScenarios":"Thrown at searx/engines/vuhuv.py:43 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"9fea41204fdfa7a5cfa15b0ebd12904c520478ce","analyzedAt":"2026-08-27T06:40:00.395Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}