From 25fde269435e2d8a94e83f11ed93f6cfba7a6112 Mon Sep 17 00:00:00 2001 From: Barrett Ruth Date: Sun, 5 Oct 2025 13:42:06 -0400 Subject: [PATCH] feat(scrapers): cses soft too --- scrapers/cses.py | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/scrapers/cses.py b/scrapers/cses.py index 73c5964..0ef9778 100644 --- a/scrapers/cses.py +++ b/scrapers/cses.py @@ -221,23 +221,18 @@ class CSESScraper(BaseScraper): html = await fetch_text(client, task_path(pid)) tests = parse_tests(html) timeout_ms, memory_mb = parse_limits(html) - if not tests: - return { - "problem_id": pid, - "error": f"{self.platform_name}: no tests found", - } - return { - "problem_id": pid, - "tests": [ - {"input": t.input, "expected": t.expected} - for t in tests - ], - "timeout_ms": timeout_ms, - "memory_mb": memory_mb, - "interactive": False, - } - except Exception as e: - return {"problem_id": pid, "error": str(e)} + except Exception: + tests = [] + timeout_ms, memory_mb = 0, 0 + return { + "problem_id": pid, + "tests": [ + {"input": t.input, "expected": t.expected} for t in tests + ], + "timeout_ms": timeout_ms, + "memory_mb": memory_mb, + "interactive": False, + } tasks = [run_one(p.id) for p in problems] for coro in asyncio.as_completed(tasks):