diff --git a/scripts/lib/bird_x.py b/scripts/lib/bird_x.py index 63a6c44..66f3101 100644 --- a/scripts/lib/bird_x.py +++ b/scripts/lib/bird_x.py @@ -213,7 +213,10 @@ def _run_bird_search(query: str, count: int, timeout: int) -> Dict[str, Any]: if not output: return {"items": []} - return json.loads(output) + parsed = json.loads(output) + if isinstance(parsed, list): + return {"items": parsed} + return parsed except json.JSONDecodeError as e: return {"error": f"Invalid JSON response: {e}", "items": []}