INNER CODE UNIT · Python

search_test

KatrielMoses/voidaccess · api/main.py:653

async def search_test(_=Depends(get_current_user)) -> dict:
    """
    Test search engine connectivity.
    TODO: Remove or protect in production.
    """
    try:
        from search.search import get_search_results  # noqa: PLC0415

        results = get_search_results("bitcoin+dark+web")
        return {
            "search_working": True,
            "results_count": len(results),
            "first_result": results[0] if results else None,
        }
    except Exception as exc:
        return {"search_working": False, "error": str(exc)}

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…