feat(scrapers): cses soft too
This commit is contained in:
parent
ee88450b3b
commit
25fde26943
1 changed files with 12 additions and 17 deletions
|
|
@ -221,23 +221,18 @@ class CSESScraper(BaseScraper):
|
||||||
html = await fetch_text(client, task_path(pid))
|
html = await fetch_text(client, task_path(pid))
|
||||||
tests = parse_tests(html)
|
tests = parse_tests(html)
|
||||||
timeout_ms, memory_mb = parse_limits(html)
|
timeout_ms, memory_mb = parse_limits(html)
|
||||||
if not tests:
|
except Exception:
|
||||||
return {
|
tests = []
|
||||||
"problem_id": pid,
|
timeout_ms, memory_mb = 0, 0
|
||||||
"error": f"{self.platform_name}: no tests found",
|
return {
|
||||||
}
|
"problem_id": pid,
|
||||||
return {
|
"tests": [
|
||||||
"problem_id": pid,
|
{"input": t.input, "expected": t.expected} for t in tests
|
||||||
"tests": [
|
],
|
||||||
{"input": t.input, "expected": t.expected}
|
"timeout_ms": timeout_ms,
|
||||||
for t in tests
|
"memory_mb": memory_mb,
|
||||||
],
|
"interactive": False,
|
||||||
"timeout_ms": timeout_ms,
|
}
|
||||||
"memory_mb": memory_mb,
|
|
||||||
"interactive": False,
|
|
||||||
}
|
|
||||||
except Exception as e:
|
|
||||||
return {"problem_id": pid, "error": str(e)}
|
|
||||||
|
|
||||||
tasks = [run_one(p.id) for p in problems]
|
tasks = [run_one(p.id) for p in problems]
|
||||||
for coro in asyncio.as_completed(tasks):
|
for coro in asyncio.as_completed(tasks):
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue